RunWithoutSpan runs the given function with the span stripped from the context and replaced with a no-op span. This is useful for avoiding logs being added to span (to save money).
(ctx context.Context, fn func(ctx context.Context))
| 40 | // context and replaced with a no-op span. This is useful for avoiding logs |
| 41 | // being added to span (to save money). |
| 42 | func RunWithoutSpan(ctx context.Context, fn func(ctx context.Context)) { |
| 43 | ctx = trace.ContextWithSpan(ctx, NoopSpan) |
| 44 | fn(ctx) |
| 45 | } |
| 46 | |
| 47 | func MetadataFromContext(ctx context.Context) map[string]string { |
| 48 | metadata := make(map[string]string) |
no outgoing calls
no test coverage detected