-
Notifications
You must be signed in to change notification settings - Fork 59
Description
When running the README example otel-cli exec --kind producer "otel-cli exec --kind consumer sleep 1"
or similar commands, where otel-cli exec
calls something, which then also calls otel-cli exec
to wrap a command in a span, only the first layer receives any environment variables. Thus if following the example or a similar pattern, like setting export OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
, you only get the root span.
Seems like this is intentional based on https://github.com/equinix-labs/otel-cli/blame/6018f76ee976e4d80d24c7aa1a0fb0f6df71a4be/otelcli/config.go#L147 and #138, but it does break one of the intro examples and seems to require explicitly setting more values on every subsequent call to otel-cli
.
Right now I'm just exploring and doing PoC work with the tool, and I can easily source the env vars wherever I'm calling the tool, but is it more recommended to use a config instead?