frostfs-observability/tracing/span.go

13 lines
369 B
Go
Raw Permalink Normal View History

package tracing
import (
"context"
"go.opentelemetry.io/otel/trace"
)
// StartSpanFromContext creates a span and a context.Context containing the newly-created span.
func StartSpanFromContext(ctx context.Context, operationName string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
return tracer.Load().Tracer.Start(ctx, operationName, opts...)
}