Method
Inject
(ctx context.Context, carrier propagation.TextMapCarrier)
Source from the content-addressed store, hash-verified
| 41 | } |
| 42 | |
| 43 | func (o onlySampledTraces) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { |
| 44 | sc := trace.SpanContextFromContext(ctx) |
| 45 | if !sc.IsSampled() { |
| 46 | return |
| 47 | } |
| 48 | o.TextMapPropagator.Inject(ctx, carrier) |
| 49 | } |
| 50 | |
| 51 | func extractTracingContextFromMetadata(ctx context.Context, md client.Metadata) context.Context { |
| 52 | carrier := &clientMetadataCarrier{metadata: md} |
Tested by
no test coverage detected