Add optional Exception parameter to Emit LogRecord#4824
Add optional Exception parameter to Emit LogRecord#4824lmolkova merged 10 commits intoopen-telemetry:mainfrom
Exception parameter to Emit LogRecord#4824Conversation
5c36fd4 to
7f8e5ee
Compare
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Can you add some details how this helps with perf? if we didn't have |
yup, and user would have to generate the entire stacktrace, only for it to be truncated to X chars in Java (open-telemetry/opentelemetry-java#7281) we only generate the first X chars of the stacktrace in the firstplace |
cijothomas
left a comment
There was a problem hiding this comment.
LGTM, nice improvement!
(Exception is already first class in .NET's ILogger logging library - every log method can accept an Exception optionally.)
I'm wondering whether a note could be added - such optimizations are optional but it would be nice to leave a hint to people reading the spec in the future. |
Co-authored-by: Robert Pająk <pellared@hotmail.com>
added in 63e791c |
### Context - Deprecate Jaeger propagator and make propagator implementation optional. ([#4827](#4827)) - Deprecate OT Trace propagator and make propagator implementation optional. ([#4851](#4851)) ### Metrics - Add normative language to the Metrics API/SDK spec concurrency requirements. ([#4868](#4868)) ### Logs - Add optional `Exception` parameter to Emit LogRecord. ([#4824](#4824)) - Add normative language to the Logging API/SDK spec concurrency requirements. ([#4885](#4885)) ### Resource - Refine the handling of OTEL_RESOURCE_ATTRIBUTES. ([#4856](#4856)) ### Common - Add string representation guidance for complex attribute value types (byte arrays, empty values, arrays, and maps) for non-OTLP protocols. ([#4848](#4848)) ### Compatibility - Stabilize Prometheus Counter to OTLP Sum transformation. ([#4862](#4862)) - Stabilize Prometheus Gauge to OTLP Gauge transformation. ([#4871](#4871)) ### SDK Configuration - Swap Tracer/Meter/LoggerConfig `disabled` for `enabled` to avoid double negatives ([#4823](#4823)) - Declarative configuration: rename `ComponentProvider` to `PluginComponentProvider`, `CreatePlugin` to `CreateComponent` in effort to use consistent vocabulary ([#4806](#4806)) - Declarative configuration: Update instrumentation config behavior to return empty object when not set ([#4817](#4817))
Part of OTEP 4430.
This could be considered "just a convenience", but (in addition to a very nice convenience) it also unlocks two additional features:
OTEL_ATTRIBUTE_VALUE_LENGTH_LIMITinto consideration when generating largeexception.stacktraceattributes (a very real issue in the Java world: Add custom stacktrace renderer which is length limit aware opentelemetry-java#7281)exception.stacktraceattributes: Configurable exception.* attribute resolution opentelemetry-java#7266)Prototype: open-telemetry/opentelemetry-java#7182