@@ -162,29 +162,30 @@ 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
+ For any two calls with identical parameters, it is undefined whether the same
166
+ or different `Logger` instances are returned.
167
167
168
168
This function may return different `Logger` types (e.g. a no-op logger
169
169
vs. a functional logger).
170
170
171
171
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.
172
+ name: The name of the instrumenting module, package or class.
173
+ This should *not* be the name of the module, package or class that is
174
+ instrumented but the name of the code doing the instrumentation.
180
175
E.g., instead of ``"requests"``, use
181
176
``"opentelemetry.instrumentation.requests"``.
182
177
178
+ For log sources which define a logger name (e.g. logging.Logger.name)
179
+ the Logger Name should be recorded as the instrumentation scope name.
180
+
183
181
version: Optional. The version string of the
184
182
instrumenting library. Usually this should be the same as
185
183
``importlib.metadata.version(instrumenting_library_name)``.
186
184
187
185
schema_url: Optional. Specifies the Schema URL of the emitted telemetry.
186
+
187
+ attributes: Optional. Specifies the instrumentation scope attributes to
188
+ associate with emitted telemetry.
188
189
"""
189
190
190
191
0 commit comments