fix: ENV based Open Tracing provider configuration support #3421
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments
I've been trying to configure hydra for open telemetry with New Relic and am running into some issues.
I've identified one that this resolves. It's currently not possible to set the open telemetry server url (or any of the open telemetry tracing provider options from https://github.com/ory/x/blob/f6df4499d0545937d3de211c97116671f431d60f/otelx/config.go#L44) through environment variables because the configuration schema does not know about them (and the json schema is used to parse env vars).
Adding that config to the schema fixes the env var parsing. (However I'm still working on getting open tracing working overall for my use case)
I think this'll also update docs
I have not added tests, as I'm expecting the codebase is already exercising the env var parsing logic through the example jaeger config files, and I didn't see an equivalent for zipkin.