Skip to content

feat(config): wire top-level attribute_limits into per-signal providers#5365

Open
ocelotl wants to merge 4 commits into
open-telemetry:mainfrom
ocelotl:diego/config-attribute-limits
Open

feat(config): wire top-level attribute_limits into per-signal providers#5365
ocelotl wants to merge 4 commits into
open-telemetry:mainfrom
ocelotl:diego/config-attribute-limits

Conversation

@ocelotl

@ocelotl ocelotl commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Closes #5357

Summary

  • Reads config.attribute_limits in configure_sdk() and passes it as a global fallback to create_tracer_provider() and create_logger_provider()
  • Per-signal limits (tracer_provider.limits / logger_provider.limits) always take precedence; absent fields fall back to the global value, then to OTel spec defaults
  • Adds log_record_limits parameter to LoggerProvider, threads it through Logger down to each ReadWriteLogRecord — mirroring how SpanLimits flows through TracerProvider

Test plan

  • tests/_configuration/test_sdk.py — global limits passed to per-signal factories
  • tests/_configuration/test_tracer_provider.py — per-signal override, global fallback, spec defaults
  • tests/_configuration/test_logger_provider.py — same coverage for logs; verifies limits are applied (not just warned about)
  • tests/logs/ — no regressions in existing log SDK tests

ocelotl added 4 commits June 26, 2026 15:14
Parses config.attribute_limits in configure_sdk() and passes it as a
global fallback to create_tracer_provider() and create_logger_provider().
Per-signal limits (tracer_provider.limits / logger_provider.limits)
always take precedence; absent fields fall back to the global value, then
to OTel spec defaults.

For logs, adds log_record_limits to the LoggerProvider constructor,
threads it through Logger, and applies it when constructing each
ReadWriteLogRecord — mirroring how SpanLimits flows through TracerProvider.
@ocelotl ocelotl marked this pull request as ready for review June 26, 2026 21:28
@ocelotl ocelotl requested a review from a team as a code owner June 26, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

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

1 participant