1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

Move baggage and propagation to separate packages (#1325)

* Move propagation code to propagation package

* Move baggage code to baggage package

* Update changelog

* Make docs of baggage.Set more clear

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Krzesimir Nowak
2020-11-13 16:34:24 +01:00
committed by GitHub
parent f6df5df938
commit 63a11144cf
21 changed files with 116 additions and 119 deletions

View File

@@ -0,0 +1,26 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package propagation_test
import (
"go.opentelemetry.io/otel/global"
"go.opentelemetry.io/otel/propagation"
)
func ExampleTraceContext() {
tc := propagation.TraceContext{}
// Register the TraceContext propagator globally.
global.SetTextMapPropagator(tc)
}