Repository navigation
fix(ingest): map current RPC semantic conventions to rpc_service and rpc_method - #363
Merged
Merged
Conversation
…rpc_method Current RPC conventions deprecate rpc.service and fold it into a fully qualified rpc.method such as oteldemo.CurrencyService/Convert. Ingest read only rpc.service and rpc.method, so those spans had an empty rpc_service and a qualified rpc_method, unlike spans from older SDKs. When rpc.service is absent, split a qualified rpc.method at its last slash into service and method, so both columns mean the same thing whichever convention the producer follows. Spans that carry rpc.service keep their values, and raw attributes are unchanged. No schema or format change. Fixes #362 Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
JSON-RPC method names may contain a slash, such as LSP's textDocument/hover, and must not become a service and method. Split a qualified rpc.method only when rpc.system.name, or the deprecated rpc.system, is grpc or connect_rpc, whose conventions define it as service/method. Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
Current conventions spell Connect RPC as rpc.system.name=connectrpc; the deprecated rpc.system value is connect_rpc. Accept both, so compliant Connect spans still split their qualified rpc.method. Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Current RPC conventions deprecate
rpc.serviceand fold it into a fully qualifiedrpc.methodsuch asoteldemo.CurrencyService/Convert. Ingest read onlyrpc.serviceandrpc.method, so those spans had an emptyrpc_serviceand a qualifiedrpc_method, unlike spans from older SDKs. The OpenTelemetry Demo 3.1.0currencyservice reproduces it (#362).Change
rpc.serviceis absent, a qualifiedrpc.methodis split at its last/intorpc_serviceandrpc_method.rpc.servicekeep their values; raw attributes stay unchanged inattributes.Verification
TestTraceRPCSemanticConventions: 13 cases covering the old and new conventions, an explicit service with a qualified method, no slash, last, trailing and leading slashes, and empty or absent values.just checkFixes #362
https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ