Skip to content

Conversation

ol1s
Copy link
Contributor

@ol1s ol1s commented Jul 24, 2025

Currently, exceptions on spans ARE presenting a useful stack trace whereas exceptions in logs ARE NOT presenting the stack trace.

As per otel semantic conventions:

Exceptions SHOULD be recorded as attributes on the LogRecord passed to the Logger emit operations

https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-logs/

This proposal records the exception with stack trace on the log record, using a similar implementation to the Span.php

@ol1s
Copy link
Contributor Author

ol1s commented Jul 24, 2025

Opened in the main repo instead of sub tree open-telemetry/opentelemetry-php-contrib#410

@ol1s ol1s closed this Jul 24, 2025
@ol1s ol1s deleted the record-exception-with-stack-trace-on-log-records branch July 24, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant