According to the specifications, the OpenTelemetry SDK must be programmatically configurable. The current initialization looks for implementations of the OpenTelemetry API via Service Provider and if no instance is found, it defaults to a no-op implementation. In the SIG call, we agreed that the default behavior should be no-op until a configuration is provided.
I think we should still do the SPI thing we do at this moment, while also supporting explicit, manual configuration as done in #1058
I think @bogdandrutu was going to prototype an SDK that could also be a no-op until it had been configured, which would, I think, solve many of the startup-timing issues that make all of this extra tricky.
https://github.com/open-telemetry/opentelemetry-java/issues/1311#issuecomment-639607426
I have some questions about this:
My opinion is
1) require setup
2) everything no-op until it's called. Some background thing may happen before a user gets to setup the SDK (e.g., initialize db connection pool) and it would add noise if these got instrumented but without the proper setup.
Can we push this off until after GA? I think this is a purely additive change to the API/SDK, so it seems like this could be pushed off, especially as the instrumentation agent seems to be working fine for now.
Technically we should implement this as part of the Specification (as mentioned by @thisthat in the issue description) - yet I feel this is indeed something that could be left as "Required for GA" but low priority (in case we cannot address all the items by deadline time).
@thisthat @anuraaga Sounds great? If not, please elaborate ;)
Heh. I wrote that specification, so I do think we should be programmatically configurable. But, I also think we could probably get away with only SPI for GA, if we need to.
If SPI covers all configuration options that we want to provide, then it is certainly enough for GA. Other options, like setup method or such, can be added after GA.
Moving to after-ga. Please yell if you think this is actually needed for GA.
I think this would be satisfied by #1737 , yes?
Most helpful comment
Technically we should implement this as part of the Specification (as mentioned by @thisthat in the issue description) - yet I feel this is indeed something that could be left as "Required for GA" but low priority (in case we cannot address all the items by deadline time).
@thisthat @anuraaga Sounds great? If not, please elaborate ;)