Skip to content

Conversation

@AbhiPrasad
Copy link
Member

The OTEL spec specifies a EventName field on logs: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.46.0/specification/logs/data-model.md#field-eventname

This is specced as event.name in our conventions: https://github.com/getsentry/sentry-conventions/blob/main/model/attributes/event/event__name.json.

Right now we don't grab this field from the OTLP schema, which is unexpected behaviour as users would expect this field to show up in the logs. This PR updates the OTLP logs transform to set event.name.

@AbhiPrasad AbhiPrasad self-assigned this Nov 19, 2025
@AbhiPrasad AbhiPrasad marked this pull request as ready for review November 19, 2025 19:42
@AbhiPrasad AbhiPrasad requested a review from a team as a code owner November 19, 2025 19:42
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the event name to one of the test cases in otel_to_sentry. Apart from that, LGTM!

trace_id,
span_id,
event_name,
..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any other fields hidden in .. that why might want to transform? I personally like listing all the unused fields as foo: _ to highlight that we ignore them deliberately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other fields don't have any value, but it's a good point to write them out as unused. Changed in 7e8f349

@AbhiPrasad AbhiPrasad added this pull request to the merge queue Nov 20, 2025
Merged via the queue into master with commit aad4b60 Nov 20, 2025
28 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-otlp-event-name branch November 20, 2025 15:05
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.

4 participants