Skip to content

[Http Metrics] Replace http.error.reason with OTel standard error.type #91909

Closed

Description

@antonfirsov

Align attribute name and semantics with the OpenTelemetry spec (which was finalized yesterday 2023/9/11 - see open-telemetry/semantic-conventions#205) -- http.error.reason attribute has been standardized under name error.type. We need to:

  • Rename http.error.reason to error.type.
  • Report error.type also for valid responses where the HTTP status code indicates an error (4xx and 5xx) -- in such case, the value should be the string representation of the HTTP status code.
    • Note: Currently we report http.error.reason only when the underlying handler fails to fetch a response.

See error.type in the spec for more details.

For context: We introduced the attribute http.error.reason in PR #89809 (on 2023/8/3) based on the in-progress draft of the OTel spec (open-telemetry/semantic-conventions#205).

Given that this is new 8.0 feature, we should adapt to the spec in 8.0 to avoid breaking changes with 9.0.

Activity

  1. added this to the 8.0.0 milestone on Sep 12, 2023
  2. ghost added
    in-pr
    on Sep 12, 2023
  3. ghost removed
    in-pr
    on Sep 13, 2023
  4. ghost added
    in-pr
    on Sep 13, 2023
  5. karelz commented on Sep 13, 2023

    @karelz
    Member

    Reopening to track backport to 8.0

  6. reopened this on Sep 13, 2023
  7. ghost removed
    in-pr
    on Sep 14, 2023
  8. karelz commented on Sep 15, 2023

    @karelz
    Member

    Fixed in main (9.0) in PR #91910 and in 8.0 (RC2) in PR #91996

  9. ghost locked as resolved and limited conversation to collaborators on Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions