Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

http.status_code tag in the transaction payload #445

Open

Description

@marandaneto

unknown

The UI special case the http.status_code tag in the transaction payload (not spans) to show the status sublabel with the HTTP status code (see flask image).

This looks suboptimal due to, let's say we have a transaction that finishes with the status OK, this transaction has 2 spans which are HTTP requests, one of them is a 200 and the other one is a 500, both are running in parallel and since the tag is in the transaction tags and not span tags, the span that finishes the later always wins setting the tag, overwriting the previous tag.

The same transaction may have a 200 or 500 randomly and can be confusing.

is it an issue? should we address that? also, http.status_code isn't part of the spec so most SDKs are not setting it.

Activity

  1. rhcarvalho commented on Oct 5, 2021

    @rhcarvalho
    Contributor

    For web servers, on the transaction level, the HTTP status is the status of the incoming request -- and not of any outgoing requests (child spans).

    Does that clarify the case you are describing?

  2. marandaneto commented on Oct 5, 2021

    @marandaneto
    ContributorAuthor

    @rhcarvalho mmmm, that makes sense, since each incoming request will be its own transaction.

    should we doc this special tag @rhcarvalho ?

  3. rhcarvalho commented on Oct 5, 2021

    @rhcarvalho
    Contributor
  4. marandaneto commented on Oct 6, 2021

    @marandaneto
    ContributorAuthor

    we only document the HTTP client integrations https://develop.sentry.dev/sdk/features/#http-client-integrations but not Web servers, or is it documented somewhere else?

    it should not be that different from the client one tho.

  5. marandaneto commented on Oct 20, 2022

    @marandaneto
    ContributorAuthor

    Nope, this is not the same thing, this issue is about transactions and not events.

  6. romtsn commented on Nov 2, 2022

    @romtsn
    Contributor

    Whoever updates the spec, please share this with client-infra to make sure we're aligned between SDKs

  7. marandaneto commented on Nov 3, 2022

    @marandaneto
    ContributorAuthor
  8. adinauer commented on Aug 7, 2023

    @adinauer
    Member

    For Spring WebMVC we're currently unable to get the correct response code. For Spring WebFlux we've added the response code to contexts/response/status_code for transactions in getsentry/sentry-java#2870.

    We have to check if the UI has already been updated to also look at http.response.status_code in Span data and contexts/response/status_code for transactions.

  9. adinauer commented on Aug 7, 2023

    @adinauer
    Member

    Just confirmed, UI does not look at contexts/response/status_code.

  10. adinauer commented on Aug 7, 2023

    @adinauer
    Member

    Also not http.response.status_code in Span data

  11. adinauer commented on Aug 7, 2023

    @adinauer
    Member

    We do not want to look at span data here as the status is supposed to display the status of the transaction.

    Opened getsentry/sentry#54274 for reading the status code from response context in the UI.

    Once the UI can show status code from there we can do start changing SDKs.

    • We also have to document where to put the status code for transactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions