-
Notifications
You must be signed in to change notification settings - Fork 791
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
Allow vendor distribution to provide default configuration #1243
Conversation
d5e73d1
to
cee844d
Compare
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.
Hey @mateuszrzeszutek!
What do you think of turning Config
into just a POJO (e.g. @AutoValue
)? (e.g. still with static get()
method to get the singleton instance)
And moving the construction of the Config
object into javaagent-tooling
?
Then wouldn't need to reference agent class loader from bootstrap class loader, which is where the complexity enters.
One other thought, it looks like the ExporterConfig
arg to SpanExporterFactory.fromConfig(ExporterConfig)
is basically unused, and if we replaced that with a Properties
object (we can combine propertiesFromConfigFile
and propertiesFromSpi
before passing in), then the exporter modules wouldn't need to depend on instrumentation-api
and javaagent-tooling
which would be nice.
If we pass just |
That's a great idea!
Hmm, one downside of this approach would be duplicating the configuration loading order in each exporter: merged-spi-and-file-props -> env variables -> system properties. Anyway, that seems like a lot of changes -- do you think that we should do it in this PR? |
A, |
You read configuration once, normalize it (or more precise, you let |
Nice, reusing SDK |
I've pushed a PR that contains all those refactorings: #1254 |
3ba8321
to
a33acb1
Compare
a33acb1
to
9f92554
Compare
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.
Sweet!
Resolves #1213
As an additional benefit, now all SDK
ConfigBuilder
s can use properties from both SPI and theotel.trace.config
file (which they did not use before).Needs to be merged after #1254