Skip to content

Logging stability review: [minor] LogRecord attribute limits not configurable via LoggerProvider #5357

Description

@lmolkova

Spec: Logs SDK § LogRecord Limits

If the SDK implements attribute limits it MUST provide a way to change these limits, via a configuration to the LoggerProvider [...]

  • Required (MUST): if attribute limits are implemented, expose a way to change them via configuration to the LoggerProvider.
  • Current: LogRecordLimits (max_attributes, max_attribute_length) is implemented and enforced, but only configurable through env vars (OTEL_ATTRIBUTE_COUNT_LIMIT, OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) or defaults. LoggerProvider.__init__ has no limits/log_record_limits parameter.
  • Missing: programmatic configuration on LoggerProvider, unlike TracerProvider(span_limits=...). Cross-signal inconsistency.

Part of open-telemetry/community#1751

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions