Skip to content

Fix otel.sdk.log.created counting semantics #8688

Description

@cijothomas

SdkLogRecordBuilder.emit() increments otel.sdk.log.created only after the isEnabled(severity, context) check, so records suppressed by the minimum severity threshold or trace-based rules aren't counted.

Per semantic-conventions #3939, this is wrong — every record submitted to an enabled Logger should be counted, even if it's later filtered within the SDK:

Every log record submitted to an enabled Logger is counted, even if it is later filtered or dropped within the SDK (e.g. by minimum severity or trace-based rules, or by a processor or the export pipeline), making this metric the top of the log delivery funnel.

We should count at intake, before the severity/trace filtering. A disabled Logger is already a no-op so it stays uncounted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions