MCPcopy Index your code
hub / github.com/coder/coder / GetTracerName

Function GetTracerName

coderd/tracing/httpmw.go:108–114  ·  view source on GitHub ↗

GetTracerName returns the tracer name from the context, or TracerName if none is set.

(ctx context.Context)

Source from the content-addressed store, hash-verified

106// GetTracerName returns the tracer name from the context, or TracerName if none
107// is set.
108func GetTracerName(ctx context.Context) string {
109 if tracerName, ok := ctx.Value(tracerNameKey{}).(string); ok {
110 return tracerName
111 }
112
113 return TracerName
114}
115
116// StartSpan calls StartSpanWithName with the name set to the caller's function
117// name.

Callers 1

StartSpanWithNameFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected