You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: always re-add config values provided with --config after internal config values (#164)
### Description
After switching to the otelcol's internal `--config` flag, the bundled
config files provided by the `observe-agent` now are processed _after_
any configuration provided with `--config`. This makes it so the bundled
config values cannot be overwritten via the `--config` flag (only via
the `otel_config_overrides` option). This fix makes the flag take
precedence again.
Ex:
```
$ cat ./hc_test.yaml
extensions:
health_check:
endpoint: 0.0.0.0:13137
```
Current 2.0.0:
```
$ observe-agent start --config ./hc_test.yaml
# ...
2025-02-10T11:10:54.862-0600 info healthcheckextension/healthcheckextension.go:32 Starting health_check extension {"kind": "extension", "name": "health_check", "config": {"Endpoint":"localhost:13133","TLSSetting":null,"CORS":null,"Auth":null,"MaxRequestBodySize":0,"IncludeMetadata":false,"ResponseHeaders":null,"CompressionAlgorithms":null,"ReadTimeout":0,"ReadHeaderTimeout":0,"WriteTimeout":0,"IdleTimeout":0,"Path":"/status","ResponseBody":null,"CheckCollectorPipeline":{"Enabled":false,"Interval":"5m","ExporterFailureThreshold":5}}}
```
^ note the `"Endpoint":"localhost:13133"`
After this fix:
```
$ ./observe-agent start --config ./hc_test.yaml
# ...
2025-02-10T11:11:41.227-0600 info healthcheckextension/healthcheckextension.go:32 Starting health_check extension {"kind": "extension", "name": "health_check", "config": {"Endpoint":"0.0.0.0:13137","TLSSetting":null,"CORS":null,"Auth":null,"MaxRequestBodySize":0,"IncludeMetadata":false,"ResponseHeaders":null,"CompressionAlgorithms":null,"ReadTimeout":0,"ReadHeaderTimeout":0,"WriteTimeout":0,"IdleTimeout":0,"Path":"/status","ResponseBody":null,"CheckCollectorPipeline":{"Enabled":false,"Interval":"5m","ExporterFailureThreshold":5}}}
```
^ note the `"Endpoint":"0.0.0.0:13137"`
### Checklist
- [ ] Created tests which fail without the change (if possible)
- [ ] Extended the README / documentation, if necessary
---------
Co-authored-by: obs-gh-nikhildua <[email protected]>
0 commit comments