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