2020-09-08 16:07:59 -07:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-02-29 07:05:28 +01:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-09-08 16:07:59 -07:00
|
|
|
|
2020-11-13 16:34:24 +01:00
|
|
|
package propagation_test
|
2020-09-08 16:07:59 -07:00
|
|
|
|
|
|
|
import (
|
2020-11-16 18:30:54 +01:00
|
|
|
"go.opentelemetry.io/otel"
|
2020-11-13 16:34:24 +01:00
|
|
|
"go.opentelemetry.io/otel/propagation"
|
2020-09-08 16:07:59 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
func ExampleTraceContext() {
|
2020-11-13 16:34:24 +01:00
|
|
|
tc := propagation.TraceContext{}
|
2020-09-08 16:07:59 -07:00
|
|
|
// Register the TraceContext propagator globally.
|
2020-11-16 18:30:54 +01:00
|
|
|
otel.SetTextMapPropagator(tc)
|
2020-09-08 16:07:59 -07:00
|
|
|
}
|