MCPcopy Create free account
hub / github.com/cortexproject/cortex / getSpanContext

Function getSpanContext

pkg/querier/tripperware/queryrange/results_cache.go:792–804  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

790}
791
792func getSpanContext(ctx context.Context) (jaeger.SpanContext, bool) {
793 span := opentracing.SpanFromContext(ctx)
794 if span == nil {
795 return jaeger.SpanContext{}, false
796 }
797
798 spanContext, ok := span.Context().(jaeger.SpanContext)
799 if !ok {
800 return jaeger.SpanContext{}, false
801 }
802
803 return spanContext, true
804}
805
806// extractStats returns the stats for a given time range
807// this function is similar to extractSampleStream

Callers 2

jaegerSpanIDFunction · 0.85
jaegerTraceIDFunction · 0.85

Calls 1

ContextMethod · 0.45

Tested by

no test coverage detected