Skip to content

Conversation

thompson-tomo
Copy link
Contributor

@thompson-tomo thompson-tomo commented Oct 2, 2025

Fixes #2812

Changes

The rpc spans now contains the error.type attribute for capturing that detail.

Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

@thompson-tomo
Copy link
Contributor Author

Waiting on #2738 to progress this PR

@KalleOlaviNiemitalo
Copy link

For JSON-RPC, Microsoft defines an error.data object schema that can name an exception type as well as the types of inner exceptions that caused the exception. See Throwing and handling exceptions and CommonErrorData.TypeName.

Taking such a type name from the error object and using it as error.type in telemetry risks blowing the cardinality too high; but if the client and the server are part of the same product, so that the client can trust the server to keep the cardinality low, then I think it's OK.

@thompson-tomo
Copy link
Contributor Author

So for jsonrpc spans error.type would likely be sourced from the error.code property hence providing low cardinality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rpc enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Add error.type to rpc spans
2 participants