-
Notifications
You must be signed in to change notification settings - Fork 986
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
Fixes #37647 - Make telemetry allowed_labels configurable #10243
base: develop
Are you sure you want to change the base?
Fixes #37647 - Make telemetry allowed_labels configurable #10243
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.
I think we shouldn't require those values to always be present in settings.yaml
but rather have a hard coded default. We do that in config/settings.rb.
Good point. And we should allow to configure either
that will update just the classes. I will update PR accordingly. |
ae09483
to
de95d06
Compare
config/initializers/5_telemetry.rb
Outdated
@@ -125,4 +125,5 @@ | |||
'Widget', | |||
], | |||
} | |||
allowed_labels.merge!(SETTINGS[:telemetry][:allowed_labels]) if SETTINGS[:telemetry] and SETTINGS[:telemetry][:allowed_labels] |
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.
Note this is a merge, not a deep merge. So it replaces all keys. Did you intend:
allowed_labels.merge!(SETTINGS[:telemetry][:allowed_labels]) if SETTINGS[:telemetry] and SETTINGS[:telemetry][:allowed_labels] | |
allowed_labels.deep_merge!(SETTINGS[:telemetry][:allowed_labels]) if SETTINGS.dig(:telemetry, :allowed_labels) |
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.
Good points, I am still ruby newbie :)
de95d06
to
3d2b5cf
Compare
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
3d2b5cf
to
4cbcd5b
Compare
I think the failing |
Correct, I just restarted those tests because it should have been fixed. |
It might not be the best idea to put the lengthy list of classes to
settings.yaml
. As the list contains majority of classes either way, maybe we can have there simply:?