@@ -89,11 +89,11 @@ this OTEP proposes to record exception stack traces on logs with `Error` or high
8989 - Unhandled exceptions that don't result in application shutdown should be recorded with severity ` Error `
9090 - Errors that result in application shutdown should be recorded with severity ` Fatal ` .
9191
92- 1 . When recording exception on logs, user applications and instrumentations are encouraged to put additional attributes
92+ 6 . When recording exception on logs, user applications and instrumentations are encouraged to put additional attributes
9393 to describe the context that the exception was thrown in.
9494 They are also encouraged to define their own error events and enrich them with exception details.
9595
96- 2 . OTel SDK should record stack traces on exceptions with severity ` Error ` or higher and should allow users to
96+ 7 . OTel SDK should record stack traces on exceptions with severity ` Error ` or higher and should allow users to
9797 change the threshold.
9898
9999 See [ logback exception config] ( https://logback.qos.ch/manual/layouts.html#ex ) for an example of configuration that
@@ -109,7 +109,7 @@ this OTEP proposes to record exception stack traces on logs with `Error` or high
109109It should not be an instrumentation library concern to decide whether exception stack trace should be recorded or not.
110110Library may write logs providing exception instance through a log bridge and not be aware of this guidance.
111111
112- It also maybe desirable by some vendors/apps to record all the exception details.
112+ It also maybe desirable by some vendors/apps to record all exception details at all levels .
113113
114114OTel Logs API should provide methods that enrich log record with exception details such as
115115` setException(exception) ` similar to [ RecordException] ( ../specification/trace/api.md?plain=1#L682 )
@@ -242,8 +242,8 @@ MessageContext context = retrieveNext();
242242try {
243243 processMessage. accept(context)
244244} catch (Throwable t) {
245- // This native instrumentation may use OTel log API or another logging library such as SLF4J .
246- // Here we use Error severity since it remained unhandled by the application code
245+ // This native instrumentation may use OTel log API or another logging library such as slf4j .
246+ // Here we use Error severity since this exception was not handled by the application code.
247247 logger. atError()
248248 .addKeyValuePair(" messaging.message.id" , context. getMessageId())
249249 ...
@@ -268,7 +268,7 @@ final class InstrumentedRecordInterceptor<K, V> implements RecordInterceptor<K,
268268
269269 @Override
270270 public void failure (ConsumerRecord<K , V > record , Exception exception , Consumer<K , V > consumer ) {
271- // we should capture the error in the scope of the processing span (or pass its context explicitly).
271+ // we should capture this error in the scope of the processing span (or pass its context explicitly).
272272 logger. logRecordBuilder()
273273 .setSeverity(Severity . ERROR )
274274 .addAttribute(" messaging.message.id" , record. getId())
@@ -314,7 +314,8 @@ Alternatives:
314314
315315## Open questions
316316
317- TBD
317+ - Do we need to have log-related limits similar to [ span event limits] ( /specification/trace/sdk.md#span-limits )
318+ on the SDK level?
318319
319320## Future possibilities
320321
0 commit comments