getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.86k stars 1.55k forks source link

Normalize `http.response.status_code` for Metrics & Alerts #8692

Open AbhiPrasad opened 1 year ago

AbhiPrasad commented 1 year ago

Problem Statement

ref https://github.com/getsentry/sentry-javascript/issues/8365 team issue https://github.com/getsentry/team-sdks/issues/9

Add status code to transactions under contexts.response.status_code

Response context: https://github.com/getsentry/relay/blob/master/relay-general/src/protocol/contexts/response.rs

Solution Brainstorm

Add context on transaction.finish

Add types for response context

mydea commented 11 months ago

Just to clarify, this is not fixed by https://github.com/getsentry/sentry-javascript/pull/8366, but in addition to that we also want to set the status code in the transaction context?

AbhiPrasad commented 11 months ago

Yes, because transactions don't have data applied to them.