getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.74k stars 4.15k forks source link

OpsGenie Webhook missing attached tags #72220

Open dachakra opened 4 months ago

dachakra commented 4 months ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Create issue alert Attach the environment tag to opsgenie webhook

Expected Result

Expected to see the environment tag in the opsgenie alert

Actual Result

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 4 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 4 months ago

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

cathteng commented 3 months ago

Webhook event data is generated here https://github.com/getsentry/sentry/blob/fdbcd3a5f92edea5c1d60a7b96f5e32723786def/src/sentry/tasks/sentry_apps.py#L60-L83

We call event.as_dict() to get the event information https://github.com/getsentry/sentry/blob/fdbcd3a5f92edea5c1d60a7b96f5e32723786def/src/sentry/eventstore/models.py#L541-L568, which includes all of the tags.

This fetches tags from Snuba with a fallback on Nodestore https://github.com/getsentry/sentry/blob/fdbcd3a5f92edea5c1d60a7b96f5e32723786def/src/sentry/eventstore/models.py#L130-L157

If tags are not appearing in the webhook data, that would appear to be some problem with Snuba or Nodestore as the integration does not manipulate (remove) the tags in any way besides formatting them.

dachakra commented 3 months ago

Confirmed that the event payload is missing the tag.

cathteng commented 3 months ago

I would follow up with the team that is responsible for storing and fetching tags, we don't manipulate any of the tags in Python when populating the webhook