GetTracerName returns the tracer name from the context, or TracerName if none is set.
(ctx context.Context)
| 106 | // GetTracerName returns the tracer name from the context, or TracerName if none |
| 107 | // is set. |
| 108 | func 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. |
no test coverage detected