mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-26 21:05:00 +02:00
Add tracer option argument to global Tracer function (#1902)
* Add tracer opt arg to global Tracer func * Update PR number
This commit is contained in:
parent
035fc650a2
commit
6324adaa66
@ -43,6 +43,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||
- Unembed `SpanContext` in `Link`. (#1877)
|
||||
- Semantic conventions are now generated from the specification YAML. (#1891)
|
||||
- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901)
|
||||
- The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902)
|
||||
- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903)
|
||||
|
||||
### Deprecated
|
||||
|
6
trace.go
6
trace.go
@ -22,9 +22,9 @@ import (
|
||||
// Tracer creates a named tracer that implements Tracer interface.
|
||||
// If the name is an empty string then provider uses default name.
|
||||
//
|
||||
// This is short for GetTracerProvider().Tracer(name)
|
||||
func Tracer(name string) trace.Tracer {
|
||||
return GetTracerProvider().Tracer(name)
|
||||
// This is short for GetTracerProvider().Tracer(name, opts...)
|
||||
func Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
|
||||
return GetTracerProvider().Tracer(name, opts...)
|
||||
}
|
||||
|
||||
// GetTracerProvider returns the registered global trace provider.
|
||||
|
Loading…
Reference in New Issue
Block a user