Skip to content
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

ref(pymongo): Remove redundant command name in query description #3189

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

0Calories
Copy link
Contributor

The query command is already included as the first key within the command JSON, so query spans would end up looking like this:

image

Our Node SDK, which uses OTel under the hood now, formats queries differently; it doesn't include the command name at the front, example:

image

We also already include the command within the db.operation tag, so there's no confusion or loss of details here. This change will ensure consistent behaviour between our other SDKs!

@0Calories 0Calories self-assigned this Jun 20, 2024
@antonpirker
Copy link
Member

But then when I look at the span tree, I do not know which command was run, right? So I always have to click into the span and find db.operation to know what command was used. Not sure if this is the best experience

@antonpirker
Copy link
Member

But if otel does it this way, then we probably need to update the span tree, to display db.operation.

@antonpirker
Copy link
Member

But this is something that "future us" need to do :-)

@antonpirker antonpirker merged commit ec7172e into master Jun 21, 2024
111 checks passed
@antonpirker antonpirker deleted the ashanand/pymongo-query-description-change branch June 21, 2024 05:27
@0Calories
Copy link
Contributor Author

@antonpirker Thanks for the review! You won't always have to click on the span to see the operation, since in most cases, the operation is the first key in the JSON, which you can see in the span description. It seems like the operation isn't included only when it's an insert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants