Repository navigation
feat(names): Add span name rules for rpc spans - #714
pabloDeputter wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 584e7a6. Configure here.
| "is_in_otel": true, | ||
| "otel_notes": "OpenTelemetry names RPC spans `{rpc.method}`, falling back to `{rpc.system.name}` if `rpc.method` is unavailable or set to `_OTHER`. AWS SDK spans are named `{rpc.service}.{rpc.method}`, which the first template matches.", | ||
| "ops": ["rpc"], | ||
| "templates": ["{{rpc.service}}.{{rpc.method}}", "{{rpc.method}}", "{{rpc.system.name}}", "RPC call"], |
There was a problem hiding this comment.
RPC template order overrides method names
Medium Severity
The first template wins whenever both rpc.service and rpc.method are present, so general RPC spans are named {rpc.service}.{rpc.method} instead of {rpc.method}. Current OTel instrumentations still emit both attributes by default, and rpc.method is already the fully-qualified name, so the combined form also duplicates the service.
Reviewed by Cursor Bugbot for commit 584e7a6. Configure here.
There was a problem hiding this comment.
- sentry spans only have both
rpc.serviceandrpc.methodfor AWS SDK calls, whererpc.methodis just the operation, e.g.rpc.service=S3&rpc.method=GetObject - OTel deprecated
rpc.servicefor RPC, but keeps it for AWS on purpose (Mergerpc.methodandrpc.serviceinto fully-qualifiedrpc.method, clarify span name and possible high cardinality open-telemetry/semantic-conventions#3223 (comment))
So spans that have "fully-qualified" rpc.method don't have rpc.service, so they fall back to {{rpc.method}} as is expected.


Description
Add span name rules for
rpcspans; follows OTel semconv:{rpc.service}.{rpc.method}for AWS SDK spans (https://opentelemetry.io/docs/specs/semconv/cloud-providers/aws-sdk/#aws-sdk-spans).{rpc.method}for general RPC spans with{rpc.system.name}as fallback ifrpc.methodis not available. (https://opentelemetry.io/docs/specs/semconv/rpc/rpc-spans/#name)