Skip to content

Make declarative config YAML parsing and object mapping requirements pluggable via SPI #8820

Description

@jack-berg

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Feature RequestSuggest an idea for this project

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions