Add declarative config support for sensitive_query_parameters#8087
Add declarative config support for sensitive_query_parameters#8087trask wants to merge 2 commits intoopen-telemetry:mainfrom
sensitive_query_parameters#8087Conversation
| * @throws DeclarativeConfigException if an unexpected type is encountered accessing the property | ||
| */ | ||
| @Nullable | ||
| public static List<String> sensitiveQueryParameters(ConfigProvider configProvider) { |
There was a problem hiding this comment.
Do you like these helper functions?
There was a problem hiding this comment.
good question, I guess not really 😄
There was a problem hiding this comment.
My initial thought is that they would be helpful for instrumentation conform to these general config options. All the instrumentation in opentelemetry-java-instrumentation can leverage shared utils in that repo to do this type of thing, so its really only native instrumentation that would stand to benefit.
There was a problem hiding this comment.
I kind of like the explicitness of seeing the yaml path in the code.
But can see them being useful.
What's your thought about these methods handling default values (and never returning null)?
There was a problem hiding this comment.
What's your thought about these methods handling default values (and never returning null)?
I support. Their value proposition decreases if the caller still has to be aware of the default semantics.
There was a problem hiding this comment.
I guess I didn't realize that the defaults would be defined per applicable semantic convention: https://github.com/open-telemetry/opentelemetry-configuration/pull/531/changes#diff-d77a4fdd93a40cc4f4e39de58670cb50a8f0cfed9d012f4960d773a9f50642d6R165
Does this suggest that the sensitive_query_parameters property is better suited under .instrumentation/development.general.http instead of .instrumentation/development.general.sanitization.url?
Or the helper function needs to be renamed to reflect that this is sensitive query parameters for HTTP instrumentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8087 +/- ##
=========================================
Coverage 90.32% 90.32%
+ Complexity 7607 7604 -3
=========================================
Files 839 839
Lines 22888 22913 +25
Branches 2283 2283
=========================================
+ Hits 20673 20697 +24
Misses 1506 1506
- Partials 709 710 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
17ac8c1 to
55cbbb6
Compare
Depends on open-telemetry/opentelemetry-configuration#531