Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Logs SDK: consider removingLogData and extending SDKLogRecord to have instrumentation scope #4313

Closed
Labels
@lmolkova

Description

@lmolkova

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 theLogRecord.
It would be more efficient and easier to use if SDK version of theLogRecord included instrumentation scope and was used directly by the processing pipeline.

Spec allows this via

The SDK may also use a single type to represent both ReadableLogRecord and ReadWriteLogRecord.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#additional-logrecord-interfaces

Specific changes:

  • SDK implementation of theLogRecord should have instrumentation scope property
  • SDKLogger implementation should populate instrumentation scope on the log record when it's created or emitted
  • LogRecordProcessor.on_emit should takeLogRecord as a parameter
  • LogExporter.export should takeSequence[LogRecord] as parameters

See prototype inlmolkova@ac81b5e#diff-36f9acf9eab5e742a5a9c25b30236b688323375867ba50caf3fdea8ec6a7d91f

Part ofopen-telemetry/community#1751

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp