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

Add additional attributes for mongo DB spans #2907

Closed
avzis opened this issue Oct 30, 2022 · 5 comments
Closed

Add additional attributes for mongo DB spans #2907

avzis opened this issue Oct 30, 2022 · 5 comments
Assignees
Labels
[label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide spec:trace Related to the specification/trace directory

Comments

@avzis
Copy link
Contributor

avzis commented Oct 30, 2022

What are you trying to achieve?
I want to add to the database semantic conventions additional attributes for mongo DB spans.
The value of adding these fields is to help users get more information from the traces which would allow for easier troubleshooting.

The additional attributes that I want to add are related to operations done on the DB.

For an INSERT request:
Save the value document which holds the value that is inserted.

For a DELETE request:
Save the value criteria which holds the filter criteria that is used to find the item to delete.

For an UPDATE request:
Save the values of filter and update which holds the filter criteria that is used to identify the item that we want to update, and the value to update.

@avzis avzis added the spec:trace Related to the specification/trace directory label Oct 30, 2022
@carlosalberto
Copy link
Contributor

carlosalberto commented Oct 31, 2022

Hey @avzis - was wondering why db.statement is not used here? e.g. it is used for Redis commands such as SET mykey "WuValue" which seems to have all the information you need (applying this to Mongo).

@carlosalberto carlosalberto added the [label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide label Oct 31, 2022
@avzis
Copy link
Contributor Author

avzis commented Nov 6, 2022

Hey @carlosalberto, thank you for the response.
I tried to check the db.statement value, and from what i've seen it only saves the request name, and not the values.
I will need to check whether this is an issue with the implementation in mongoDB

@carlosalberto
Copy link
Contributor

I think this is indeed a bug in the instrumentation itself, as the Spec requires that db.statement does report the full statement:

SELECT * FROM wuser_table; SET mykey "WuValue"

@trask
Copy link
Member

trask commented Nov 16, 2022

@avzis
Copy link
Contributor Author

avzis commented Nov 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide spec:trace Related to the specification/trace directory
Projects
None yet
Development

No branches or pull requests

4 participants