Skip to content

Change order of parameter evaluation #11

@RedX2501

Description

@RedX2501

Currently the parameters are evaluated in the order docs

Command line args are loaded first, then config file, then environment variables.

I would suggest to invert it.

First Environment, then config and finally command line args as this makes overriding the values easier and supports understandability.

Example:

In your .bashrc you have:

export OTEL_EXPORTER_OTLP_TIMEOUT=72h

and when calling you use:

otel-cli span background --timeout 1s &

It is surprising now that it blocks for a long time. To actually have the timeout be 1s you must:

OTEL_EXPORTER_OTLP_TIMEOUT= otel-cli span background --timeout 1s &

and this becomes actually impossible if it is set in the config file as you would need to edit the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions