-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/mongodb] add receiver.mongodb.removeDatabaseAttr Alpha feature gate #27621
[receiver/mongodb] add receiver.mongodb.removeDatabaseAttr Alpha feature gate #27621
Conversation
94bca89
to
f5279be
Compare
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.
LGTM, but can we do this with a feature gate?
Thanks for the reviews @djaglowski! I will look into how to implement it using feature gates. |
Thanks @sakulali |
4d40348
to
f0c1b64
Compare
receiver.mongodb.removeDatabaseResourceAttr
Alpha feature gate
receiver.mongodb.removeDatabaseResourceAttr
Alpha feature gatef0c1b64
to
d8414e9
Compare
Hello @djaglowski , i would greatly appreciate it if you could kindly review the code changes of the feature gate. |
@sakulali, I think we should leave database as a resource attribute and remove it as a datapoint attribute. Apologies, this should have been stated in the issue and/or noticed in the initial review. A couple reasons here:
|
Thanks for thoughtful reply @djaglowski. The reasons you mentioned make sense, and I will take some time to make the necessary adjustments to the code. |
d8414e9
to
c7df02e
Compare
c7802ed
to
25662ba
Compare
Hello @djaglowski, sorry fo delay reply, i tried to remove datapoint attribute with a feature gate and replace with resource attribute, it seems that regardless of whether the feature gate is enabled or not, the database attribute will be removed. Could you mind help reviews again? |
Thanks for continuing on with this @sakulali.
Can you explain why and what the purpose of the feature gate would be in this case? |
Thanks for your patient guidance @djaglowski :). I don't have a thorough understanding of feature gates. From my understanding, the purpose of a feature gate is to inform users that there will be changes to telemetry in future versions, giving downstream users sufficient time to make adjustments. In transitional versions, users can enable the feature gate to adopt new functionality or disable it to retain the original functionality. |
@sakulali, that's my understanding as well, but what doesn't make sense to me is why we would include a feature gate if it isn't going to actually control anything. That my interpretation of what you said To be clear, I think we need the feature gate, but it should control whether or not the the database attribute is present. |
@djaglowski, thanks very much for helping me correct my mistake and clarifying the proper approach and significance of the feature gate. I will take some more time to think about how to implement this feature gate. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
e967d37
to
2fa4409
Compare
Signed-off-by: sakulali <[email protected]>
2fa4409
to
39c4dad
Compare
Sorry for delay. Thanks for your attentive correction, could you help to reviews again @djaglowski? During this time, i have been contemplating how to implement this feature. I came across PR 29152 by chance and found some inspiration from it. I would like to express my gratitude to @mx-psi for that. |
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.
Thank you very much for persisting through this effort @sakulali.
Description:
Add
receiver.mongodb.removeDatabaseAttr
Alpha feature gate to remove duplicate database name attribute.Link to tracking Issue:
#24972
Testing:
make generate
make chlog-validate
go test for mongodbreceiver
Manually tested, built image and manually enabled and disabled this feature gate.
This is the warning we publish:
Documentation: