Documentation
¶
Index ¶
- func NewChildSpan(ctx context.Context, tr *tracing.Tracer, spanName string) (context.Context, trace.Span)
- func PrepareOutgoingRequest(ctx context.Context, r *http.Request, tr *tracing.Tracer) (context.Context, *http.Request)
- func PrepareRequest(r *http.Request, tr *tracing.Tracer) (*http.Request, trace.Span)
- func SetAttributes(tr *tracing.Tracer, span trace.Span, kvs ...attribute.KeyValue)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChildSpan ¶
func NewChildSpan(ctx context.Context, tr *tracing.Tracer, spanName string, ) (context.Context, trace.Span)
NewChildSpan returns the context with a new Span situated as the child of the previous span
func PrepareOutgoingRequest ¶ added in v2.0.4
func PrepareOutgoingRequest(ctx context.Context, r *http.Request, tr *tracing.Tracer, ) (context.Context, *http.Request)
PrepareOutgoingRequest attaches HTTP client tracing hooks and injects the active trace context into an outbound request.
func PrepareRequest ¶
PrepareRequest extracts trace information from the headers of the incoming request. It returns a pointer to the incoming request with the request context updated to include all span and tracing info. It also returns a span with the name "Request" that is meant to be a parent span for all child spans of this request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.