influxdata / influxdata/influxdb
Inconsistent CLI flag vs env var: --traces-jaeger-{debug-name,tags} drop EXPORTER but env keeps it
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
### Observed at v3.9.2
Two Jaeger config options have a CLI flag whose name diverges from the env var name. All other `--traces-exporter-jaeger-*` options keep `exporter` in both:
| CLI flag | env var |
| --- | --- |
| `--traces-exporter-jaeger-agent-host` | `INFLUXDB3_TRACES_EXPORTER_JAEGER_AGENT_HOST` |
| `--traces-exporter-jaeger-agent-port` | `INFLUXDB3_TRACES_EXPORTER_JAEGER_AGENT_PORT` |
| `--traces-exporter-jaeger-service-name` | `INFLUXDB3_TRACES_EXPORTER_JAEGER_SERVICE_NAME` |
| `--traces-exporter-jaeger-trace-context-header-name` | `INFLUXDB3_TRACES_EXPORTER_JAEGER_TRACE_CONTEXT_HEADER_NAME` |
| **`--traces-jaeger-debug-name`** | **`INFLUXDB3_TRACES_EXPORTER_JAEGER_DEBUG_NAME`** |
| **`--traces-jaeger-tags`** | **`INFLUXDB3_TRACES_EXPORTER_JAEGER_TAGS`** |
| `--traces-jaeger-max-msgs-per-second` | `INFLUXDB3_TRACES_JAEGER_MAX_MSGS_PER_SECOND` |
Source:
- `core/trace_exporters/src/lib.rs` defines flag `--traces-jaeger-debug-name` with env `TRACES_EXPORTER_JAEGER_DEBUG_NAME`, and flag `--traces-jaeger-tags` with env `TRACES_EXPORTER_JAEGER_TAGS`.
- `influxdb3_startup/src/env_compat.rs::ENV_ALIASES` then aliases the legacy names to `INFLUXDB3_TRACES_EXPORTER_JAEGER_DEBUG_NAME` and `INFLUXDB3_TRACES_EXPORTER_JAEGER_TAGS`.
### Why it matters
The mismatch is easy to misread; it has already produced a docs error (since corrected in influxdata/docs-v2#7182) and a downstream Helm-chart error (influxdata/helm-charts#783, fix in #786).
### Suggested resolution
Pick one shape and use it consistently. Either:
1. **Rename the flags** to `--traces-exporter-jaeger-debug-name` and `--traces-exporter-jaeger-tags` (matches the env names and the rest of the family), keeping the current names as deprecated aliases for one release.
2. **Rename the env vars** to `INFLUXDB3_TRACES_JAEGER_DEBUG_NAME` and `INFLUXDB3_TRACES_JAEGER_TAGS`, with current names aliased.
(1) is probably less disruptive — env vars are referenced by Helm charts, systemd units, and CI configs in the wild; the flags are more often typed by humans.
### Refs
- influxdata/DAR#686 (private)
- influxdata/docs-v2#7182
- influxdata/helm-charts#783, influxdata/helm-charts#786
Contributor guide
Research direction
Start in core/trace_exporters/src/lib.rs, where the two Jaeger flags and their environment names are defined, then inspect influxdb3_startup/src/env_compat.rs::ENV_ALIASES. Confirm the chosen naming shape with maintainers before changing it; done means the two options are consistent, compatibility aliases are preserved as required, and the related CLI and environment behavior is covered by existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100