Skip to content

Allow configuring OTEL_* settings from anywhere, not only environment #151

@srogovtsev

Description

@srogovtsev

#141 (see also #12) has brought support for standard OpenTelemetry configuration (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and so on), but it only consumes them from environment, while standard OpenTelemetry implementation in .NET allow consuming the same configuration options from passed IConfiguration, no matter where they are defined (which is handy for non-standard deployments). I propose we add some way to pass any configuration to the OpenTelemetry configuration method.

As I understand that adding IConfiguration would not be desirable due to an additional dependency, I propose we simply expose already existing Func<string, string?> configuration getter (which is very easily mappable to IConfiguration.Item[string], to allow for additional extensibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions