Repository navigation
fix(otel): client spans identify their callee (db.namespace, server.address) - #55
Merged
Merged
Conversation
…ddress) Three postgresql client spans carried no db.namespace, so a backend keyed them as plain "postgresql" and drew a node beside postgresql-orders_db and the rest. Five SendGrid and Stripe client calls named the peer only by service.peer.name, with no server.address; a bare single-label name cannot be told apart from an internal service, so a backend that never saw it answer read it as missing. Adds db.namespace (orders_db, inventory_db) and server.address/server.port (api.sendgrid.com, api.stripe.com, 443) to those spans, matching the flows that already set them, and a conformance test that fails on any postgresql client span without db.namespace or any peer-naming client span without server.address and server.port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ETWOYA
approved these changes
Oct 13, 2026
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.
Why
Some client spans did not say what they called, so a backend could only key the dependency on the bare system or peer name:
db.namespace(INSERT ordersin the failed-payment flow,SELECT pending_notifications,CheckAvailability batch). They keyed as plainpostgresqland drew a node besidepostgresql-orders_dband the others.db.namespaceis Conditionally Required "if available", and the generator always knows the database.service.peer.name, noserver.address.server.addressis Required on an HTTP client span. A bare single-label name such assendgridcannot be told apart from an internal service, so a backend that never saw it answer reported it as missing.What
db.namespace(orders_db,inventory_db) on the three postgresql spans.server.addressandserver.port(api.sendgrid.com/api.stripe.com, 443) on the five calls, matching the flows that already set them;http.request.methodon the oneSendEmailcall that lacked it.TestClientSpansIdentifyTheirCallee: fails on any postgresql client span withoutdb.namespace, or any client span withservice.peer.namebut noserver.addressandserver.port. It fails with 13 violations onmainand passes here.Not changed: consumer spans that carry
service.peer.name(they consume a queue, they do not call the peer), and redis or the search and vector stores, which run as single instances and do not split.Test
go vet ./...andgo test ./...pass.🤖 Generated with Claude Code