Skip to content

Comments

Add declarative config support for sensitive_query_parameters#8087

Draft
trask wants to merge 2 commits intoopen-telemetry:mainfrom
trask:sensitive_query_parameters
Draft

Add declarative config support for sensitive_query_parameters#8087
trask wants to merge 2 commits intoopen-telemetry:mainfrom
trask:sensitive_query_parameters

Conversation

@trask
Copy link
Member

@trask trask commented Feb 13, 2026

* @throws DeclarativeConfigException if an unexpected type is encountered accessing the property
*/
@Nullable
public static List<String> sensitiveQueryParameters(ConfigProvider configProvider) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you like these helper functions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question, I guess not really 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.32%. Comparing base (6b98c74) to head (55cbbb6).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trask trask force-pushed the sensitive_query_parameters branch from 17ac8c1 to 55cbbb6 Compare February 18, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants