diff --git a/pkg/services/replicator/process.go b/pkg/services/replicator/process.go index a54668e1..16bcec9c 100644 --- a/pkg/services/replicator/process.go +++ b/pkg/services/replicator/process.go @@ -6,7 +6,10 @@ import ( "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs" "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine" putsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/put" + "git.frostfs.info/TrueCloudLab/frostfs-observability/tracing" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" "go.uber.org/zap" ) @@ -28,6 +31,13 @@ func (p *Replicator) HandleTask(ctx context.Context, task Task, res TaskResult) ) }() + ctx, span := tracing.StartSpanFromContext(ctx, "Replicator.HandleTask", + trace.WithAttributes( + attribute.Stringer("address", task.Addr), + attribute.Int64("number_of_copies", int64(task.NumCopies)), + )) + defer span.End() + if task.Obj == nil { var err error task.Obj, err = engine.Get(ctx, p.localStorage, task.Addr)