@@ -10,6 +10,7 @@ import (
10
10
"github.com/cschleiden/go-workflows/internal/sync"
11
11
"github.com/cschleiden/go-workflows/internal/tracing"
12
12
"github.com/cschleiden/go-workflows/internal/workflowstate"
13
+ "github.com/cschleiden/go-workflows/internal/workflowtracer"
13
14
"go.opentelemetry.io/otel/attribute"
14
15
"go.opentelemetry.io/otel/trace"
15
16
)
@@ -30,7 +31,7 @@ func CreateSubWorkflowInstance[TResult any](ctx sync.Context, options SubWorkflo
30
31
})
31
32
}
32
33
33
- func createSubWorkflowInstance [TResult any ](ctx sync.Context , options SubWorkflowOptions , attempt int , workflow interface {}, args ... interface {}) Future [TResult ] {
34
+ func createSubWorkflowInstance [TResult any ](ctx sync.Context , options SubWorkflowOptions , attempt int , wf interface {}, args ... interface {}) Future [TResult ] {
34
35
f := sync .NewFuture [TResult ]()
35
36
36
37
// If the context is already canceled, return immediately.
@@ -39,7 +40,7 @@ func createSubWorkflowInstance[TResult any](ctx sync.Context, options SubWorkflo
39
40
return f
40
41
}
41
42
42
- name := fn .Name (workflow )
43
+ name := fn .Name (wf )
43
44
44
45
inputs , err := a .ArgsToInputs (converter .DefaultConverter , args ... )
45
46
if err != nil {
@@ -54,7 +55,7 @@ func createSubWorkflowInstance[TResult any](ctx sync.Context, options SubWorkflo
54
55
55
56
wfState .TrackFuture (scheduleEventID , workflowstate .AsDecodingSettable (f ))
56
57
57
- span := tracing .Tracer (ctx ).Start (
58
+ span := workflowtracer .Tracer (ctx ).Start (ctx ,
58
59
"CreateSubworkflowInstance" , trace .WithAttributes (
59
60
attribute .String ("name" , name ),
60
61
attribute .Int64 (tracing .ScheduleEventID , scheduleEventID ),
0 commit comments