2020-05-29 22:04:55 +02:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-02-29 08:05:28 +02:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-05-29 22:04:55 +02:00
|
|
|
|
2020-11-16 19:30:54 +02:00
|
|
|
package otel // import "go.opentelemetry.io/otel"
|
2020-05-29 22:04:55 +02:00
|
|
|
|
|
|
|
import (
|
2020-11-16 19:30:54 +02:00
|
|
|
"go.opentelemetry.io/otel/internal/global"
|
2020-11-13 17:34:24 +02:00
|
|
|
"go.opentelemetry.io/otel/propagation"
|
2020-05-29 22:04:55 +02:00
|
|
|
)
|
|
|
|
|
2020-11-16 19:30:54 +02:00
|
|
|
// GetTextMapPropagator returns the global TextMapPropagator. If none has been
|
2020-10-02 21:27:16 +02:00
|
|
|
// set, a No-Op TextMapPropagator is returned.
|
2020-11-16 19:30:54 +02:00
|
|
|
func GetTextMapPropagator() propagation.TextMapPropagator {
|
|
|
|
return global.TextMapPropagator()
|
2020-05-29 22:04:55 +02:00
|
|
|
}
|
|
|
|
|
2020-12-17 22:07:09 +02:00
|
|
|
// SetTextMapPropagator sets propagator as the global TextMapPropagator.
|
2020-11-13 17:34:24 +02:00
|
|
|
func SetTextMapPropagator(propagator propagation.TextMapPropagator) {
|
2020-11-16 19:30:54 +02:00
|
|
|
global.SetTextMapPropagator(propagator)
|
2020-05-29 22:04:55 +02:00
|
|
|
}
|