feat(attributes): expand grpc attributes#460
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Lms24
left a comment
There was a problem hiding this comment.
Theoretically, we have the error namespace (also in OTel) which "defines the shared attributes used to report an error". But I get that the attributes here are very specific to GRPC, with some exceptions.
Also to confirm: We don't capture an exception in the SDK because we explicitly only want to record the error on the span? I assume because the error is not from the application but happened wherever the procedure was executed?
I'm curious on other reviewers opinions here. Should we stay GRPC-specific or would we prefer adding a bunch of specific attributes to the error namespace?
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
…pace gRPC's own OTel metrics conventions use a top-level grpc.* namespace, so nest the new google.rpc error-detail attributes there instead of under rpc.grpc.error.*, addressing review feedback on PR getsentry#460. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
renamed to Except for |
OTel's error.* namespace is intentionally minimal: it's really just error.type (a low-cardinality classifier like an exception class name or domain code), plus a deprecated error.message. It's explicitly not meant to carry rich, structured payloads. The docs even call out that message-like fields cause "unbounded cardinality" problems on spans. Also. Capturing an exception client-side felt low-value here. The client only has the serialized |

Description
Adds attribute conventions for the Google gRPC rich error model (
google.rpc.error_details.proto), under therpc.grpc.error.*namespace:rpc.grpc.error.error_info.{reason,domain,metadata.<key>}rpc.grpc.error.bad_request.field_violationsrpc.grpc.error.retry_info.retry_delay_in_msrpc.grpc.error.debug_info.{detail,stack_entries}rpc.grpc.error.precondition_failure.violationsrpc.grpc.error.resource_info.{resource_type,resource_name,description,owner}rpc.grpc.error.quota_failure.violationsField names and shapes were verified against
google/rpc/error_details.proto(AIP-193 error model) for fidelity. Structured/repeated fields (e.g.field_violations,violations) are encoded as JSON-stringified array entries, following the existing mcp.request.argument. precedent. Attributes that may carry user- or resource-identifying data (e.g.error_info.metadata.<key>,debug_info.detail,debug_info.stack_entries,resource_info.resource_name,resource_info.owner,quota_failure.violations) are documented as PII and gated behindsendDefaultPii.Unblocks getsentry/sentry-dart#3791.
PR Checklist
If an attribute was added: