Skip to content

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Jan 9, 2026

Fixes #15807

@zeitlinger zeitlinger self-assigned this Jan 9, 2026
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jan 9, 2026
@zeitlinger zeitlinger force-pushed the config-property-util-cleanup branch from dcf6adf to a510da4 Compare January 9, 2026 16:16
@zeitlinger zeitlinger marked this pull request as ready for review January 9, 2026 16:35
@zeitlinger zeitlinger requested a review from a team as a code owner January 9, 2026 16:35
@zeitlinger zeitlinger added this to the v2.24.0 milestone Jan 9, 2026
// this test uses reflection to access fields generated by FieldBackedProvider
// internal-reflection needs to be disabled because it removes these fields from reflection results.
jvmArgs("-Dotel.instrumentation.internal-reflection.enabled=false")
jvmArgs("-Dotel.javaagent.internal-reflection.enabled=false")
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get why you'd want to introduce a special property for this instead of using the standard instrumentation disabling flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a setting that must use properties even when declarative config is used - because it's needed at an early phase.

Since declarative config uses a different approach, it would be confusing to keep the same syntax.

Copy link
Contributor

Choose a reason for hiding this comment

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

I still don't quite get why the standard way of disabling the instrumentations wouldn't work. Is it because of reading the property in AgentCachingPoolStrategy? If so I think reading the property there isn't really needed, it allows skipping a check, but that check is cheap anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it's because of that check

Copy link
Member

Choose a reason for hiding this comment

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

@zeitlinger can you try @laurit's suggestion?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
public final class DeprecatedLibraryConfigPropertiesUtil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see what we gain from this change.

Copy link
Member Author

Choose a reason for hiding this comment

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

it allows the methods to be deprecated - this has caused some confusion in a previous PR

@trask fyi

Copy link
Member

Choose a reason for hiding this comment

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

I think things are getting clearer now and we could avoid the rename and instead deprecate it saying will be removed in 3.0

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a rename - the class is split to distinguish the cases that are deprecated from the ones we still need in the future (which are few, but it's still confusing to understand right now)

@zeitlinger zeitlinger force-pushed the config-property-util-cleanup branch from 48d8630 to 508c0dc Compare January 13, 2026 07:17
@zeitlinger
Copy link
Member Author

@trask please have a look

@trask trask removed this from the v2.24.0 milestone Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup access to "otel.javaagent.*" / rename ConfigPropertiesUtil

3 participants