@@ -81,27 +81,40 @@ Some applications may require multiple `Tracer` instances, e.g. to create
8181` Span ` s on behalf of other applications. Implementations MAY provide a global
8282registry of ` Tracer ` s for such applications.
8383
84- ### Obtaining a tracer
85-
86- ` Tracer ` object construction and registration will vary by implementation.
87- ` Tracer ` s may be explicitly created and registered from user code, or resolved
88- from linked dependencies using the provider pattern.
84+ ### Obtaining a Tracer
85+
86+ New ` Tracer ` instances can be created via a ` TracerFactory ` and its ` getTracer `
87+ method. This method expects two string arguments:
88+
89+ - ` name ` (required): This name must identify the instrumentation library (also
90+ referred to as integration, e.g. ` io.opentelemetry.contrib.mongodb ` ) and * not*
91+ the instrumented library.
92+ In case an invalid name (null or empty string) is specified, a working
93+ default Tracer implementation as a fallback is returned rather than returning
94+ null or throwing an exception.
95+ A library, implementing the OpenTelemetry API * may* also ignore this name and
96+ return a default instance for all calls, if it does not support "named"
97+ functionality (e.g. an implementation which is not even observability-related).
98+ A TracerFactory could also return a no-op Tracer here if application owners configure
99+ the SDK to suppress telemetry produced by this library.
100+ - ` version ` (optional): Specifies the version of the instrumentation library
101+ (e.g. ` semver:1.0.0 ` ).
89102
90103Implementations might require the user to specify configuration properties at
91- ` Tracer ` creation time, or rely on external configuration, e.g. when using the
104+ ` TracerFactory ` creation time, or rely on external configuration, e.g. when using the
92105provider pattern.
93106
94107##### Runtimes with multiple deployments/applications
95108
96109Runtimes that support multiple deployments or applications might need to
97- provide a different ` Tracer ` instance to each deployment. To support this,
98-
99- the global ` Tracer ` registry may delegate calls to create new ` Tracer ` s to a
100- separate ` Provider ` component, and the runtime may include its own ` Provider `
101- implementation which returns a different ` Tracer ` for each deployment.
102-
103- ` Provider ` s are registered with the API via some language-specific mechanism,
104- for instance the ` ServiceLoader ` class in Java.
110+ provide a different ` TracerFactory ` instance to each deployment. To support this,
111+ the global ` TracerFactory ` registry may delegate calls to create new instances of
112+ ` TracerFactory ` to a separate ` Provider ` component, and the runtime may include
113+ its own ` Provider ` implementation which returns a different ` TracerFactory ` for
114+ each deployment.
115+
116+ ` Provider ` instances are registered with the API via some language-specific
117+ mechanism, for instance the ` ServiceLoader ` class in Java.
105118
106119### Tracer operations
107120
0 commit comments