Logs SDK: consider removing LogData
and extending SDK LogRecord
to have instrumentation scope
#4313
Labels
LogData
and extending SDK LogRecord
to have instrumentation scope
#4313
https://github.com/lmolkova/opentelemetry-python/blob/f6396062c3687cb33102a00b52607e9334ecdc85/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py#L255-L264
LogData does not serve any specific purpose besides adding instrumentation scope to the
LogRecord
.It would be more efficient and easier to use if SDK version of the
LogRecord
included instrumentation scope and was used directly by the processing pipeline.Spec allows this via
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#additional-logrecord-interfaces
Specific changes:
LogRecord
should have instrumentation scope propertyLogger
implementation should populate instrumentation scope on the log record when it's created or emittedLogRecordProcessor.on_emit
should takeLogRecord
as a parameterLogExporter.export
should takeSequence[LogRecord]
as parametersSee prototype in lmolkova@ac81b5e#diff-36f9acf9eab5e742a5a9c25b30236b688323375867ba50caf3fdea8ec6a7d91f
Part of open-telemetry/community#1751
The text was updated successfully, but these errors were encountered: