Skip to content

ConfigurationFileLoader for OpenTelemetry manual instrumentation #5428

@tusharg1993

Description

@tusharg1993

Is your feature request related to a problem? Please describe.
We are using OpenTelemetry javaagent for auto instrumentation and library for manual instrumentation. We are currently using otel.javaagent.configuration-file for java agent and load different configuration files for dev/prod environments and we pass the same using the environment variable.

We found that AutoConfiguredOpenTelemetrySdk also uses the same set of properties however, doesn't support loading configuration file like javaagent. I am wondering if there was ever a thought for enabling similar mechanism for manual instrumentation via autoconfiguration to accept a file as well. This way, we can reuse the same config file for both auto and manual instrumentation.

Describe the solution you'd like
Overall, idea was to implement something similar to ConfigurationFileLoader with a config like otel.autoconfiguration.configuration-file which gets used in AutoConfiguredOpenTelemetrySdkBuilder.getConfigs. We might want to have a different config values for java agent vs auto configured open telemetry objects since some usecases might want to have different customizations between auto vs manual instrumentation.

Describe alternatives you've considered
Nothing else really. Only thing I could probably do is add similar kind of code in my service to read a file and then pass AutoConfiguredOpenTelemetrySdkBuilder.propertiesSupplier()

Additional context
Covered above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions