Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(on-demand): Add computed contexts #4239

Merged
merged 14 commits into from
Nov 12, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented Nov 11, 2024

This PR supports computed contexts, which are calculated in the same way as in Sentry (https://github.com/getsentry/sentry/blob/486bebce5331397094f2fe37a85dd78b938c7f55/src/sentry/interfaces/contexts.py#L177-L177).

The reason for this change is that metrics extraction works only on data materialized by Relay within the event payload. In practice, some customer queries in Discover might rely on computed fields on the Sentry side, making the on-demand spec generation ineffective, as Relay does not recognize these fields.

For example, os:Something matches an os tag generated by Sentry as a combination of "{os.name} {os.version}". To address this, we are now replicating this behavior in Relay as well.

Closes: #4205

@iambriccardo iambriccardo marked this pull request as ready for review November 12, 2024 12:22
@iambriccardo iambriccardo requested a review from a team as a code owner November 12, 2024 12:22
@iambriccardo iambriccardo merged commit e657a69 into master Nov 12, 2024
22 of 23 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/computed-contexts branch November 12, 2024 13:20
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.

Materialize special contexts in the Event payload
2 participants