@@ -162,29 +162,29 @@ def get_logger(
162
162
) -> Logger :
163
163
"""Returns a `Logger` for use by the given instrumentation library.
164
164
165
- For any two calls it is undefined whether the same or different
166
- `Logger` instances are returned, even for different library names.
165
+ Calls with the same arguments should return the same `Logger` instance.
167
166
168
167
This function may return different `Logger` types (e.g. a no-op logger
169
168
vs. a functional logger).
170
169
171
170
Args:
172
- name: The name of the instrumenting module.
173
- ``__name__`` may not be used as this can result in
174
- different logger names if the loggers are in different files.
175
- It is better to use a fixed string that can be imported where
176
- needed and used consistently as the name of the logger.
177
-
178
- This should *not* be the name of the module that is
179
- instrumented but the name of the module doing the instrumentation.
171
+ name: The name of the instrumenting module, package or class.
172
+ This should *not* be the name of the module, package or class that is
173
+ instrumented but the name of the code doing the instrumentation.
180
174
E.g., instead of ``"requests"``, use
181
175
``"opentelemetry.instrumentation.requests"``.
182
176
177
+ For log sources which define a logger name (e.g. logging.Logger.name)
178
+ the Logger Name should be recorded as the instrumentation scope name.
179
+
183
180
version: Optional. The version string of the
184
181
instrumenting library. Usually this should be the same as
185
182
``importlib.metadata.version(instrumenting_library_name)``.
186
183
187
184
schema_url: Optional. Specifies the Schema URL of the emitted telemetry.
185
+
186
+ attributes: Optional. Specifies the instrumentation scope attributes to
187
+ associate with emitted telemetry.
188
188
"""
189
189
190
190
0 commit comments