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

Project: Normalize http.response.status_code for Metrics & Alerts #9

Open
9 of 10 tasks
smeubank opened this issue May 11, 2023 · 7 comments
Open
9 of 10 tasks

Comments

@smeubank
Copy link
Member

smeubank commented May 11, 2023

Project Board

https://github.com/orgs/getsentry/projects/130/views/1

Description

http.response.status_code is set in different places in different SDKs which creates some problems in processing for metrics extraction and then

https://www.notion.so/sentry/Expand-Metrics-for-Alerts-cdfa32d7624e498b8246c3f131f753f1#17480955e2fb4407b619b9236bc2723a

Requirements

  • Confirm where it is stored today for ingest to know as-is
  • Need status code number (standard HTTP status code 2xx, 4xx, 5xx, etc)
  • The SDK should never on it's own set this as a tag - as this adds expense due to indexing being based on tags
  • the location of storage needs to be in a standard location based on span schema

List of all SDKs and how they store HTTP status code now:

Web Frontend SDKs

  1. Type: Improvement
  2. Type: Improvement
    krystofwoldrich

Web Backend SDKs

  1. Status: Backlog Type: Improvement
    ribice
  2. bitsandfoxes
  3. enhancement
    sl0thentr0py
  4. Platform: Java
    adinauer
  5. antonpirker
  6. enhancement
    antonpirker
  7. Type: Improvement
    cleptric

Mobile SDKs

  1. 4 of 4
    stefanosiano
@olksdr
Copy link

olksdr commented May 11, 2023

@smeubank thanks for creating an issue for this!

I know we already talked about this, but just to mention one more time. It would be great to gather the information from the SDKs where those http status code are set now. It will give us opportunity to do some of the normalizations on the server-side and support also old SDKs till the standard place is used.

\cc @matejminar @ale-cota

@smeubank smeubank changed the title http.status normalization for Metrics & Alerts [tracking] http.status normalization for Metrics & Alerts May 12, 2023
@antonpirker
Copy link
Member

Hey I have now changed the description from http.status to http.status_code because this is mentioned in the Notion page and this is how it is called in Python SDK.

@antonpirker antonpirker changed the title [tracking] http.status normalization for Metrics & Alerts [tracking] http.status_code normalization for Metrics & Alerts May 15, 2023
@antonpirker
Copy link
Member

I added a list of all SDKs to collect how the HTTP status code is stored now. (in description above) and also linking here: https://www.notion.so/sentry/Inquiry-HTTP-Status-Code-ca90c050fb76428b8ce07a5e9e954767

@mattjohnsonpint
Copy link

Is this for status codes from HTTP client outbound calls, or from HTTP server inbound calls, or both?

@AbhiPrasad
Copy link
Member

Is this for status codes from HTTP client outbound calls, or from HTTP server inbound calls, or both?

I think we should write it for both, given we are actively thinking about indexing span info w/ Starfish.

smeubank referenced this issue in getsentry/develop May 22, 2023
Per https://github.com/getsentry/team-webplatform-meta/issues/65 we want to define where HTTP status codes should be stored in events (200, 404, 500, etc)

Reasoning for why it is a problem, is that SDKs generally should not set tags "for" users on events.
@cleptric
Copy link
Member

Unsure about removing the creation of tags for the status code in SDKs that do so today.

@antonpirker
Copy link
Member

Maybe users created alerts or dashboards for the http status code tag. Maybe we should check how many users did stuff like that.

Or we always just keep the tag and also set the status in the span data too, to make it backwards compatible.

antonpirker referenced this issue in getsentry/develop May 23, 2023
* Update span-data-conventions for HTTP.status_code

Per https://github.com/getsentry/team-webplatform-meta/issues/65 we want to define where HTTP status codes should be stored in events (200, 404, 500, etc)

Reasoning for why it is a problem, is that SDKs generally should not set tags "for" users on events.

* Update src/docs/sdk/performance/span-data-conventions.mdx

Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>

---------

Co-authored-by: Anton Pirker <anton.pirker@sentry.io>
Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
olksdr referenced this issue in getsentry/relay May 24, 2023
#2145)

This PR adds the HTTP status code extracted from the `Event` to the
common tags on transactional metrics.
The status code currently provided in different places by different SDKs
and requires from us to make sure to cover most obvious places, like
`breadcrumbs`, `span data`, `response context`, `span tags`.

Once the normalization on SDK side is done (tracking issue:
https://github.com/getsentry/team-webplatform-meta/issues/65), the
extraction on Relay side can be simplified as well.
 
fix getsentry/team-ingest#123
@antonpirker antonpirker changed the title [tracking] http.status_code normalization for Metrics & Alerts [tracking] http.response.status_code normalization for Metrics & Alerts Jun 5, 2023
@smeubank smeubank changed the title [tracking] http.response.status_code normalization for Metrics & Alerts Project: http.response.status_code normalization for Metrics & Alerts Jul 10, 2023
@stephanie-anderson stephanie-anderson changed the title Project: http.response.status_code normalization for Metrics & Alerts Project: Normalize http.response.status_code for Metrics & Alerts Jul 10, 2023
@stephanie-anderson stephanie-anderson transferred this issue from getsentry/team-webplatform-meta Jul 11, 2023
antonpirker added a commit to getsentry/develop that referenced this issue Aug 29, 2023
For normalizing where we store the HTTP response code in our events we invented the response context: getsentry/team-sdks#9

This PR adds documentation on how this response context should look like.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

7 participants