-
Notifications
You must be signed in to change notification settings - Fork 581
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
[otelmongo] Disable adding the mongo 'db.statement' tag by default #3519
[otelmongo] Disable adding the mongo 'db.statement' tag by default #3519
Conversation
As of now, the 'db.statement' tag is not obfuscated, which can lead to sensitive information being leaked through the tag. See open-telemetry#3388
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3519 +/- ##
========================================
+ Coverage 70.1% 86.4% +16.2%
========================================
Files 147 4 -143
Lines 6973 125 -6848
========================================
- Hits 4892 108 -4784
+ Misses 1958 14 -1944
+ Partials 123 3 -120
|
Thank you! 🌷 |
Done! |
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.
(sorry for the back and forth)
I think we should update the comment in
opentelemetry-go-contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go
Line 110 in 3ffe346
// TODO sanitize values where possible |
// TODO sanitize values where possible, then reenable `db.statement` span attributes default.
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.
Personally, I agree that we should be "secure by default".
Unfortunately, it is currently against the OTel specification.
Can you first try addressing it in the OTel specification? I would support it 😉
Related PR in spec: open-telemetry/opentelemetry-specification#1659
Related issue in OTel spec: open-telemetry/opentelemetry-specification#3104 |
I added a comment in support of being able to have it disabled by default if the instrumentation doesn't implement obfuscation. |
I was thinking about trying to implement obfuscation and remembered that the datadog agent does it. Took a look at the code and doesn't seem like an easy task. Hopefully the specification changes to allow for removing the tag by default. |
@dubonzi There is also an open PR here: open-telemetry/opentelemetry-specification#3127 |
@dmathieu I see you tried to link to this PR in a comment but you linked to the wrong one. I edited my comment to include the correct link. |
While the specification issue seems to be moving forward, I was thinking, would it be acceptable to use datadog's obfuscation library that is used in their agent to do the sanitization? |
Obfuscation on "raw data" is never perfect. We could use similar feature as opt-in, but we should not use it by default. EDIT:
|
Can we move forward with this now that the specification issue was accepted? |
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.
Side note: this package has no unit tests 😬
As of now, the 'db.statement' tag is not obfuscated, which can lead to sensitive information being leaked through the tag.
See #3388.