@@ -6,12 +6,8 @@ import (
6
6
7
7
"github.com/cschleiden/go-workflows/backend"
8
8
"github.com/cschleiden/go-workflows/backend/history"
9
- "github.com/cschleiden/go-workflows/internal/log"
10
- "github.com/cschleiden/go-workflows/internal/propagators"
11
9
"github.com/cschleiden/go-workflows/workflow"
12
10
"github.com/redis/go-redis/v9"
13
- "go.opentelemetry.io/otel/attribute"
14
- "go.opentelemetry.io/otel/trace"
15
11
)
16
12
17
13
func (rb * redisBackend ) SignalWorkflow (ctx context.Context , instanceID string , event * history.Event ) error {
@@ -30,19 +26,6 @@ func (rb *redisBackend) SignalWorkflow(ctx context.Context, instanceID string, e
30
26
return err
31
27
}
32
28
33
- // TODO: Can we do this in the client?
34
- ctx , err = (& propagators.TracingContextPropagator {}).Extract (ctx , instanceState .Metadata )
35
- if err != nil {
36
- rb .Options ().Logger .Error ("extracting tracing context" , log .ErrorKey , err )
37
- }
38
-
39
- a := event .Attributes .(* history.SignalReceivedAttributes )
40
- ctx , span := rb .Tracer ().Start (ctx , fmt .Sprintf ("SignalWorkflow: %s" , a .Name ), trace .WithAttributes (
41
- attribute .String (log .InstanceIDKey , instanceID ),
42
- attribute .String (log .SignalNameKey , event .Attributes .(* history.SignalReceivedAttributes ).Name ),
43
- ))
44
- defer span .End ()
45
-
46
29
if _ , err = rb .rdb .TxPipelined (ctx , func (p redis.Pipeliner ) error {
47
30
if err := rb .addWorkflowInstanceEventP (ctx , p , workflow .Queue (instanceState .Queue ), instanceState .Instance , event ); err != nil {
48
31
return fmt .Errorf ("adding event to stream: %w" , err )
0 commit comments