-
Notifications
You must be signed in to change notification settings - Fork 816
Description
LoggerProvider docs are based on old spec language and should be updated.
Specifically:
-
Identifying parameters - different loggers should be returned if parameters are different
opentelemetry-python/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py
Lines 165 to 166 in 59d6754
For any two calls it is undefined whether the same or different `Logger` instances are returned, even for different library names. was changed recently (Define attributes equality and make all fields as identifying for Tracer, Meter, Logger, EventLogger opentelemetry-specification#4161) to make all parameters identifiable and guarantee that different loggers are returned.
the implementation is already compliant, it's just a doc issue.
-
Logger name should be used as scope name
opentelemetry-python/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py
Lines 172 to 176 in 59d6754
name: The name of the instrumenting module. ``__name__`` may not be used as this can result in different logger names if the loggers are in different files. It is better to use a fixed string that can be imported where needed and used consistently as the name of the logger. Spec language
For log sources which define a logger name (e.g. Java
Logger Name)
the Logger Name should be recorded as the instrumentation scope name.Recommendation is to change the doc to something like
name: The name of the instrumenting module, package, module or class.
For log sources which define a logger name (e.g.logging.Logger.name)
the Logger Name should be recorded as the instrumentation scope name. -
Attributes are not documented as parameter in
get_loggerAPIopentelemetry-python/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py
Lines 187 to 188 in 59d6754
schema_url: Optional. Specifies the Schema URL of the emitted telemetry. """
Part of open-telemetry/community#1751
Metadata
Metadata
Assignees
Labels
Type
Projects
Status