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
## Which problem is this PR solving?
- Many OTEL Collector components provide default configs such that users
do not need to provide most settings.
- However, due to our organization of the storage extension config,
there was no way to provide defaults
## Description of the changes
- 🛑 **breaking** Change the main config inside out: instead of static
separation by storage types followed by a map of custom names, move the
map to the top level followed by static separation by storage type. E.g.
```yaml
# before
memory:
some_storage:
max_traces: 100000
# after
backends:
some_storage:
memory:
max_traces: 100000
```
- This required an introduction of an extra nesting via `backends`,
which is a bit unfortunate, but the OTEL framework requires config to be
a struct, it did not work with a map at the top level. Having a struct
might actually be beneficial in the future if we need some top-level
settings
- Add custom marshaling code where if a specific storage type is
detected as set-by-user, then a default is created first (similar
mechanism to how extension default configs is created by OTEL Collector,
but unfortunately that mechanism is rigid, non-recursive)
- Change sample config files to the new format
- Use names `some_store` and `another_store` in configs to emphasize
that those are custom names, not part of the config struct
- Add more unit tests for config
## How was this change tested?
- Unit tests and CI
## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
- for `jaeger`: `make lint test`
- for `jaeger-ui`: `yarn lint` and `yarn test`
---------
Signed-off-by: Yuri Shkuro <[email protected]>
0 commit comments