feat(chore): declarative configuration for trace_provider - #2161
feat(chore): declarative configuration for trace_provider#2161xuan-cao-swi wants to merge 17 commits into
Conversation
thompson-tomo
left a comment
There was a problem hiding this comment.
One other thing, how are we ensuring the loading of the the env variables are disabled when covered by declarative config?
Will the current approach support dynamic reloading of the config which is also a part of the spec?
mwear
left a comment
There was a problem hiding this comment.
I like the approach overall. I have a few comments based on a first pass through.
|
|
||
| private | ||
|
|
||
| def apply(config) |
There was a problem hiding this comment.
This only returns an SDK on the happy path. Other paths vary in what they return. We should define what happens on these other paths? Do we want to always return an SDK backed by no-op components or something else?
There was a problem hiding this comment.
Now it will return noop sdk (e.g. noop provider and propagator) if parsing failed
Description
This PR introduces an initial declarative configuration implementation for OpenTelemetry Ruby under otelconfig, intentionally scoped to tracing only.
I followed the Go otelconfig convention for config structure and behavior where it maps well to Ruby.
Minimalist approach: no hard dependency on optional components, which optional propagators and resource detectors are resolved only if the corresponding gem has been required by the user. If an optional component is not available, configuration continues safely with warnings instead of failing startup.
Scope in this PR
Try
/exampleUpdated (2026-06-13):
bundle exec rake generate:constantswill auto-generate the struct file.