propagation/trace_context_example_test.go
raw| 1 | // Copyright The OpenTelemetry Authors |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | package propagation_test |
| 5 | |
| 6 | import ( |
| 7 | "go.opentelemetry.io/otel" |
| 8 | "go.opentelemetry.io/otel/propagation" |
| 9 | ) |
| 10 | |
| 11 | func ExampleTraceContext() { |
| 12 | tc := propagation.TraceContext{} |
| 13 | // Register the TraceContext propagator globally. |
| 14 | otel.SetTextMapPropagator(tc) |
| 15 | } |