-
Notifications
You must be signed in to change notification settings - Fork 621
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
Get rid of pymongo command in pymongo instrumentation span name #1247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While at it could you please check what's the semconv recommendation for this? Also please add some tests.
Hey I checked the semconv recommendation and it seems like this is more in line with [https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md](the conventions) While being in line with all stated conventions there is an example within the conventions which shows instrumentation for a Mongo database. There is a small diff here where the example instrumentation contains a collection name - however the [https://api.mongodb.com/python/3.1/api/pymongo/monitoring.html](the pymongo library monitoring tool) does not return the collection name More work could be done here in the future to try to add the collection name. In the meantime it is imperative that the instrumentation is in line with the overall database specification as having a very high cardinality leads the instrumentation to become a lot less useful |
Hey would love if someone could review this |
As others have pointed out
open-telemetry/opentelemetry-java-instrumentation#341
by including the query within the span name we lead to very high cardinality which is too high to be useful and this can also lead to privacy concerns
This pull requests follows the logic found in the java and golang mongo instrumentations and does not include the entire command but the database name and command name within the span name
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1
https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.