1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Files
opentelemetry-go/propagation.go
T

21 lines
636 B
Go
Raw Normal View History

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
package otel // import "go.opentelemetry.io/otel"
2020-05-29 13:04:55 -07:00
import (
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/propagation"
2020-05-29 13:04:55 -07: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 13:04:55 -07:00
}
2020-12-17 15:07:09 -05:00
// SetTextMapPropagator sets propagator as the global TextMapPropagator.
func SetTextMapPropagator(propagator propagation.TextMapPropagator) {
global.SetTextMapPropagator(propagator)
2020-05-29 13:04:55 -07:00
}