Skip to content

exception.stacktrace attribute isn't included in exception events #5139

@mikk2168

Description

@mikk2168

Description

When a panic occurs in a request, an exception event is created, but the exception.stacktrace attribute isn't set.
According to the otel spec on exceptions, the exception.stacktrace attribute SHOULD be set. Currently it isn't, and I haven't been able to find a way to have it included.

Environment

  • OS: macOS
  • Architecture: arm64
  • Go Version: 1.22.0
  • otelmux version: 0.48.0

Steps To Reproduce

  1. Use the otelmux middleware
  2. Call an end-point that panics
  3. See that the trace created contains an exception event, with no stacktrace attribute

Expected behavior

I would expect the exception event to include the stacktrace. I see how this may not always be desired, so an alternative to always including it, could be a way to explicitly tell the middleware to include it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions