Skip to content

Ensure consistent EarlyInitAgentConfig access#15787

Merged
trask merged 4 commits intoopen-telemetry:mainfrom
zeitlinger:early-agent-config
Jan 9, 2026
Merged

Ensure consistent EarlyInitAgentConfig access#15787
trask merged 4 commits intoopen-telemetry:mainfrom
zeitlinger:early-agent-config

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

Based on #15761

@zeitlinger
Copy link
Copy Markdown
Member Author

@trask please check again

@trask trask merged commit 04b73e5 into open-telemetry:main Jan 9, 2026
85 checks passed
@zeitlinger zeitlinger deleted the early-agent-config branch January 9, 2026 16:01
@jackshirazi
Copy link
Copy Markdown
Contributor

hmm, changing the LoggingCustomizer interface breaks our distribution. Not a biggie, I can fix it but isn't this sort of API change a breaking change?

@trask
Copy link
Copy Markdown
Member

trask commented Jan 20, 2026

javaagent-tooling is an artifact of internal stuff only for distros (as opposed to javaagent-extension-api which is for more public consumption), but we can flag these in the release notes going forward if that helps.

@jackshirazi
Copy link
Copy Markdown
Contributor

Making the EarlyInitAgentConfig.getString (and other get*) private is annoying since the property we're looking at (elastic.otel.javaagent.log.level) is not one listed there. ie this is not distribution friendly.

It's not terrible, I can look for the setting directly, but (and @zeitlinger ) I think for ongoing changes to these to make it ConfigProvider friendly, please check how distributions can use additional options

@zeitlinger
Copy link
Copy Markdown
Member Author

Making the EarlyInitAgentConfig.getString (and other get*) private is annoying since the property we're looking at (elastic.otel.javaagent.log.level) is not one listed there. ie this is not distribution friendly.

It's not terrible, I can look for the setting directly, but (and @zeitlinger ) I think for ongoing changes to these to make it ConfigProvider friendly, please check how distributions can use additional options

Going forward, the ConfigProvider API is meant to be used whenever possible - much like we're already doing it in the agent.

A trimmed down version of https://github.com/zeitlinger/opentelemetry-java-instrumentation/blob/79edac70672b2d52bfa35b8b5727b6370e566261/declarative-config-bridge/src/main/java/io/opentelemetry/instrumentation/config/bridge/ConfigPropertiesBackedConfigProvider.java#L18 sholud be added to contrib. If you want, you can do that right now 😄

@jackshirazi
Copy link
Copy Markdown
Contributor

Does that help with config before the agent is initialized (which is what EarlyInitAgentConfig is needed for)?

@zeitlinger
Copy link
Copy Markdown
Member Author

Does that help with config before the agent is initialized (which is what EarlyInitAgentConfig is needed for)?

no it doesn't - maybe you'll have to have your own copy of ConfigPropertiesUtil (which is also going to javaagent-bootstrap in #15809)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants