For declarative config is affected. I think a good way to do this is to make the task of taking parsing YAML and/or converting to pojo pluggable via SPI.
Roughly, the process looks like:
Object parsedYaml = org.snakeyaml.engine.v2.api.Load.loadFromInputStream(InputStream);
OpenTelemetryConfigurationModel model = com.fasterxml.jackson.databind.ObjectMapper.convertValue(parsedYaml, OpenTelemetryConfigurationModel.class);
OpenTelemetrySdk openTelemetrySdk = create(model);
So things we need to be pluggable:
- Parsing YAML InputStream to Object
- Converting Object to POJO
The serialization stuff in the unsupported OTLP json path adds more complexity since the API surface area of JsonSerializer is large.
Originally posted by @jack-berg in #8533
Originally posted by @jack-berg in #8533