-
Notifications
You must be signed in to change notification settings - Fork 327
Extract configuration from core module to API #3122
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
Conversation
|
👋 @raphw Thanks a lot for your contribution! It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it. Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it. |
|
|
||
| static { | ||
| checkClassloader(); | ||
| configs.put(co.elastic.apm.agent.tracer.configuration.CoreConfiguration.class, CoreConfiguration.class); |
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.
[nitpick]
Imo it would be cleaner to adjust the contract of Tracer.getConfig to allow a lookup based on supertypes as long as the supertype is not ambiguous. To implement this for ElasticApmTracer, we would adapt the ConfigurationRegistry to index not only based on the concrete class but also on the supertypes.
This way no maintenance of this manual mapping is required while not worsening the performance.
However, no need to do this now. I'll maybe tackle this when I work on the config framework anyway.
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 thought about this, but the constraint is set by ConfigurationRegistry which requires its keys to be suptypes of the provider class. I found it to messy to paste inn, but hopefully the entire configuration handling can be streamlined some day.
apm-agent-core/src/main/java/co/elastic/apm/agent/impl/ElasticApmTracer.java
Outdated
Show resolved
Hide resolved
.../main/resources/META-INF/services/org.stagemonitor.configuration.ConfigurationOptionProvider
Show resolved
Hide resolved
|
💚 CLA has been signed |
… type processing.
5b021df to
313d795
Compare
|
Sorry, had to force push due to a changed user name for demonstrating an exploit somewhere else. Forgot to reset that change. |
|
@elasticmachine run elasticsearch-ci/docs |
Moves all configuration classes to the tracer module such that plugins can access it without depending on the agent core module.
Configuration that is exclusively used by the plugins, is moved to the core module altogether. Configuration that is used by both plugins and the core is split where plugins can access such configuration via a plugin.