GoToSocial/vendor/go.opentelemetry.io/otel/propagation.go

21 lines
636 B
Go
Raw Normal View History

2023-05-09 19:19:48 +02:00
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
2023-05-09 19:19:48 +02:00
package otel // import "go.opentelemetry.io/otel"
import (
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/propagation"
)
// GetTextMapPropagator returns the global TextMapPropagator. If none has been
// set, a No-Op TextMapPropagator is returned.
func GetTextMapPropagator() propagation.TextMapPropagator {
return global.TextMapPropagator()
}
// SetTextMapPropagator sets propagator as the global TextMapPropagator.
func SetTextMapPropagator(propagator propagation.TextMapPropagator) {
global.SetTextMapPropagator(propagator)
}