opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
One configuration API to rule them all
Now that we have a real configuration API, let's consolidate!
This PR shows end-to-end that we can delete all of the other configuration APIs and bridges.
ConfigProperties still needs to live, but only during SDK autoconfiguration.
Then we can bridge ConfigProperties and use the declarative configuration API everywhere else.
This PR shows the final result.
Planning to break this PR into smaller pieces:
┌─(B)─> AgentInstrumentationConfig (11 PRs) ──> Delete (1 PR)
│ - aws, database, redis, - AgentInstrumentationConfig,
│ messaging, logging, (agent) ConfigPropertiesBridge
│ graphql-grpc, web, async,
│ http, annotations, other
│
├─(C)─> Delete AgentConfig (1 PR)
│
├─(D)─> CommonConfig (1 PR) ──> CommonConfig (4 PRs) ──> Delete (1 PR)
│ - Foundation - http-clients, - CommonConfig,
│ http-servers, AgentCommonConfig,
│ database, EnduserConfig
│ other
│
(A) Agent Foundation (1 PR) ───┼─(E)─> ExperimentalConfig (4 PRs) ──> Delete (1 PR)
- Reverse bridge, │ - controller-view, - ExperimentalConfig
DeclarativeConfigUtil │ messaging,
│ indy, other
│
├─(F)─> Extension APIs (3 PRs)
│ - IgnoredTypesConfigurer,
│ InstrumentationModule,
│ AgentExtension
│
└─(G)─> Spring Boot (1 PR) ──> Spring Boot (5 PRs) ──> Delete (1 PR)
- Foundation - http-clients, - InstrumentationConfigUtil,
http-servers, (spring) ConfigPropertiesBridge
database,
messaging, other
(H) Clean up (1 PR)
- Delete InstrumentationConfig
UPDATE: remaining todos
(checked means either done, or issue created, or PR exists)
- [x] consider reworking/consolidating
AgentConfig- last usage isinstrumentationMode()- so that will be cleaned up with https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15796 - [ ] consider reworking/consolidating
AgentCommonConfig- fine as is for @zeitlinger - [ ] consider reworking/consolidating
EarlyInitAgentConfig- fine as is for @zeitlinger - [x] centralize all access to
agentconfiguration node in case we decide to move it under thedistributionwhere we won't be able to access it normally via Declarative Configuration API: created https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15807 - [x] delete
InstrumentationConfig - [x] spring starter's
LogbackAppenderInstallerstill needs to be updated to use declarative config somehow: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15812 - [x] remaining extension API
InstrumentationModule - [x] remaining extension API
AgentExtension: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15798 - [x] delete both
DeprecatedConfigProperties(may need something like this in the future, but will need to be rewritten to support declarative configuration anyways) - only remaining usage is inLogbackAppenderInstaller: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15812 - [x] deprecate
DeclarativeConfigPropertiesBridgewith a warning on usage (need a deprecation cycle since distros and extensions may be relying on it): https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15811 - [x] ensure all remaining usages of
ConfigPropertieshave been deprecated and can be removed in 3.0 - [x] IgnoredTypesConfigurer: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/15806