-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB, messaging, gRPC (over HTTP): clarify nested client spans #674
Comments
I wouldn't say that applications create at least two distinct layers of spans. While the problem is real, many instrumentations today only instrument the logical layer, with protocols built on top of HTTP being the most notable exceptions.
I'd say yes, given that in many cases on likely doesn't reliably know whether lower-level instrumentation exists?
This depends on the use case. While for most cases logical operations might be more important, especially for troubleshooting errors and performance issues information about transport operations can be crucial.
For messaging we mostly solved this question as we'll have producer/consumer kinds for the logical layer and client/server kinds for the transport layer. Producers and consumers on the logical layer will be connected via links, via clients and servers on the transport layer will be connected with parent/child relationships. However, this model will not work well for databases, where both layers will have client/server relationships. |
I love this visualization @pyohannes!
What if I know? E.g. most Azure SDKs work on top of HTTP and HTTP is instrumented. Or Cosmos DB knows if underlying transport protocol calls are instrumented (by the same SDK). Same case would happen with messaging and AMQP the moment AMQP gets instrumented.
not quite - we still have publish/ producer/consumer spans would connect application nodes, but client spans would still be needed to show the broker as a node. |
For Cosmos DB, we know that instrumentation exists in the SDK for both logical and network calls, but we don't necessarily know if customers have subscribed to both in their application. If we can be certain which sources customers are listening to it may be possible to dynamically change the span kind based on that, but changing the span kind depending on the listener may end up creating more confusion. |
The "Publish" span should of kind
This is true. I don't know of a service map that would nicely support that. |
Messaging and database conventions were updated to reflect logical nature. So this issue is limited to RPC |
Fixes #3172 (Built on top of #4088) ## Changes - Explains kinds without assuming presence of parent/children - Adds links as another correlation mechanism - Normalizes nested client spans even further - database, messaging, RPC, and LLM semantic conventions require CLIENT kind for logical client operation. - Does not touch INTERNAL kind yet - #4179 * [x] Related issues #3172, open-telemetry/semantic-conventions#674, open-telemetry/oteps#172, open-telemetry/semantic-conventions#1315 * ~~[ ] Related [OTEP(s)](/~https://github.com/open-telemetry/oteps) #~~ * ~~[ ] Links to the prototypes (when adding or changing features)~~ * [x] [`CHANGELOG.md`](/~https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md) file updated for non-trivial changes * ~~[ ] [`spec-compliance-matrix.md`](/~https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md) updated if necessary~~ --------- Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Fixes open-telemetry#3172 (Built on top of open-telemetry#4088) ## Changes - Explains kinds without assuming presence of parent/children - Adds links as another correlation mechanism - Normalizes nested client spans even further - database, messaging, RPC, and LLM semantic conventions require CLIENT kind for logical client operation. - Does not touch INTERNAL kind yet - open-telemetry#4179 * [x] Related issues open-telemetry#3172, open-telemetry/semantic-conventions#674, open-telemetry/oteps#172, open-telemetry/semantic-conventions#1315 * ~~[ ] Related [OTEP(s)](/~https://github.com/open-telemetry/oteps) #~~ * ~~[ ] Links to the prototypes (when adding or changing features)~~ * [x] [`CHANGELOG.md`](/~https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md) file updated for non-trivial changes * ~~[ ] [`spec-compliance-matrix.md`](/~https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md) updated if necessary~~ --------- Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
When working with db, messaging, or other high-level client libraries, applications could create (at least) two distinct layers of spans (when both layers are instrumented):
Some common examples:
As a result, logical-level spans describe corresponding domain (DB, messaging, etc) and network level spans describe individual RPC calls.
These two layers contain different information, even
server.address:server.port
could be different (logical operation points to a cluster/domain name, while network spans may point to individual nodes in the cluster, regional endpoints, etc).Problems it creates:
network.*
attributes?Related:
#652
open-telemetry/oteps#172
The text was updated successfully, but these errors were encountered: