1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-17 01:12:45 +02:00

Add TracerProvider tests to oteltest harness (#1607)

* Add TracerProvider tests to oteltest harness

* Update Tracer method docs

* Fix grammar
This commit is contained in:
Tyler Yahn
2021-03-03 20:09:58 +00:00
committed by GitHub
parent bb4c297eb3
commit 992837f195
5 changed files with 74 additions and 7 deletions

View File

@ -85,8 +85,13 @@ func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
return tp
}
// Tracer with the given name. If a tracer for the given name does not exist,
// it is created first. If the name is empty, DefaultTracerName is used.
// Tracer returns a Tracer with the given name and options. If a Tracer for
// the given name and options does not exist it is created, otherwise the
// existing Tracer is returned.
//
// If name is empty, DefaultTracerName is used instead.
//
// This method is safe to be called concurrently.
func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
c := trace.NewTracerConfig(opts...)