oss_21_logger_provider_log_record_limits#42
Conversation
LoggerProvider.__init__ gains a `limits` argument accepting a LogRecordLimits, mirroring how TracerProvider accepts SpanLimits. The limits are stored on the provider, threaded through each Logger, and applied when building ReadWriteLogRecord instances so attribute count and value-length limits are enforced on emitted log records. Previously LogRecordLimits could only be configured via environment variables; there was no way to set them programmatically, so _from_api_log_record always used the default limits. Default behavior (no limits argument) is unchanged.
|
🔒 Internal (dash0) — not for upstream.
|
|
📣 Public-facing draft — to be used for the upstream PR in Title: Add programmatic What
Why
Spec
CompatibilityFully backward compatible: when TestsNew |
Closes #37
LoggerProvider now accepts a programmatic
limits(LogRecordLimits, analogous to TracerProvider's SpanLimits); threaded into Logger and _from_api_log_record so attribute count/length limits apply to emitted log records (Linear OSS-21, finding L2). Backward compatible (defaults unchanged).Validation: scope contained to opentelemetry-sdk + changelog; logs suite 115 passed.
Linear issue: https://linear.app/dash0/issue/OSS-21/l2-loggerprovider-cannot-configure-logrecordlimits-programmatically