Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdk-config.yaml starter template w/ references to env vars #76

Merged
merged 13 commits into from
Jul 19, 2024

Conversation

jack-berg
Copy link
Member

@jack-berg jack-berg commented Mar 18, 2024

Resolves #55.

Part of the configuration working group recommendation on how to move forward with #3752 as described here.

  • Part of Define OTEL_EXPERIMENTAL_CONFIG_FILE to ignore other env vars, add env var substitution default syntax opentelemetry-specification#3948
  • Adds a new sdk-migration-config.yaml to the examples directory, which includes env var substitution references to all env vars which map cleanly to file config
  • Adds a new sdk-config.yaml to the example directory, which is identical to sdk-migration-config.yaml, but without env var substitution references
  • Adds a new step to the makefile build which performs env var substitution using js envsub which allows validation to take place after substitution
  • Updates the schema so all types can be null. This ensures a config file is still valid after performing env var substitution with an undefined env var.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with fixes on endpoints.

examples/sdk-config.yaml Outdated Show resolved Hide resolved
examples/sdk-config.yaml Outdated Show resolved Hide resolved
examples/sdk-config.yaml Outdated Show resolved Hide resolved
jack-berg added a commit to open-telemetry/opentelemetry-specification that referenced this pull request Apr 5, 2024
…v var substitution default syntax (#3948)

Fixes #3752.

Implementation of the configuration working group recommendation as
[described
here](#3752 (comment)).

- Adds definition for `OTEL_EXPERIMENTAL_CONFIG_FILE `, which ignores
other env vars when evaluating, except env var substitution references
- Adds new env var substitution default syntax `${ENVVAR:-defaultValue}`
- Paired with
open-telemetry/opentelemetry-configuration#76,
which defines a new
[sdk-config.yaml](https://github.com/jack-berg/opentelemetry-configuration/blob/starter-template/examples/sdk-config.yaml)
starter template referencing all env vars that map cleanly.
@jack-berg jack-berg marked this pull request as ready for review April 26, 2024 21:38
@jack-berg jack-berg requested a review from a team April 26, 2024 21:38
@jack-berg
Copy link
Member Author

This is a loose end from open-telemetry/opentelemetry-specification#3948

I've pushed an additional commit and marked as ready for review. Please review when you have the chance.

cc @open-telemetry/configuration-maintainers

examples/sdk-config.yaml Outdated Show resolved Hide resolved
examples/sdk-config.yaml Outdated Show resolved Hide resolved
@jack-berg
Copy link
Member Author

@tsloughter, @marcalff, @codeboten can you take another look? Thanks

examples/sdk-config.yaml Outdated Show resolved Hide resolved
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see more comments.

examples/sdk-migration-config.yaml Outdated Show resolved Hide resolved
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments on endpoints.

@marcalff marcalff mentioned this pull request Jul 14, 2024
@jack-berg
Copy link
Member Author

@marcalff would appreciate you taking another look when you can. Thanks!

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, see editorial changes.

README.md Outdated Show resolved Hide resolved
examples/sdk-config.yaml Outdated Show resolved Hide resolved
@jack-berg jack-berg merged commit cc7cd37 into open-telemetry:main Jul 19, 2024
2 checks passed
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…v var substitution default syntax (open-telemetry#3948)

Fixes open-telemetry#3752.

Implementation of the configuration working group recommendation as
[described
here](open-telemetry#3752 (comment)).

- Adds definition for `OTEL_EXPERIMENTAL_CONFIG_FILE `, which ignores
other env vars when evaluating, except env var substitution references
- Adds new env var substitution default syntax `${ENVVAR:-defaultValue}`
- Paired with
open-telemetry/opentelemetry-configuration#76,
which defines a new
[sdk-config.yaml](https://github.com/jack-berg/opentelemetry-configuration/blob/starter-template/examples/sdk-config.yaml)
starter template referencing all env vars that map cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Default config file template that incorporates standard env vars
4 participants