1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-30 21:20:04 +02:00
opentelemetry-go/propagation.go

21 lines
636 B
Go
Raw Normal View History

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