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

Define file configuration parse and create operations #3437

Merged
merged 24 commits into from
Oct 16, 2023

Conversation

jack-berg
Copy link
Member

Part of incorporating OTEP #225 into the specification.

Followup to #3360.

@jack-berg jack-berg requested review from a team April 24, 2023 21:21
@arminru arminru added area:configuration Related to configuring the SDK area:sdk Related to the SDK labels Apr 28, 2023
@jack-berg
Copy link
Member Author

@MrAlias, @pellared, @tsloughter PTAL.

specification/configuration/file-configuration.md Outdated Show resolved Hide resolved
specification/configuration/file-configuration.md Outdated Show resolved Hide resolved
specification/configuration/file-configuration.md Outdated Show resolved Hide resolved
specification/configuration/file-configuration.md Outdated Show resolved Hide resolved
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 27, 2023
@jack-berg
Copy link
Member Author

@MrAlias @codeboten @tsloughter @carlosalberto @yurishkuro @aabmass please take another look when you can!

@github-actions github-actions bot removed the Stale label Oct 4, 2023
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for the reminder @jack-berg. This looks good and matches what we've discussed in the working group previously 👍🏻

@pellared
Copy link
Member

pellared commented Oct 9, 2023

#3437 (comment)

@jack-berg
Copy link
Member Author

FYI, I'd like to merge this on 10/16 if there are no further comments. @carlosalberto I requested an additional review from you since the content changed since your original would be good if you could take another look and comment or approve.

@carlosalberto
Copy link
Contributor

Overall LGTM, although I'm curious about whether the config model returned by Parse() will be opaque or not, but guess we can discuss that when such model is defined (currently empty in the docs).

@jack-berg
Copy link
Member Author

Overall LGTM, although I'm curious about whether the config model returned by Parse() will be opaque or not, but guess we can discuss that when such model is defined (currently empty in the docs).

I think long term the model should be a struct / interface that the user can read from and update (or if not update provide their own implementation of the interface with updated values). This would allow users to define their own higher owner functions for merging multiple config sources. I do think allowing users to define their own merge logic is important because its unlikely we'd be able to come up with merge behavior that satisfies everyone.

But yeah, I think we can expand on the specifics of that in followup PRs.

@jack-berg jack-berg merged commit 541b2ff into open-telemetry:main Oct 16, 2023
6 checks passed
jack-berg added a commit that referenced this pull request Dec 14, 2023
Part of incorporating [OTEP
#225](open-telemetry/oteps#225) into the
specification.

Followup to #3437.

The adds the YAML file format, and leaves an open TODO for the JSON
format discussed in the original OTEP. It also define environment
variable substitution. IMO its necessary to define environment variable
substitution at the same time as file format because they interact in
ways that aren't immediately obvious and need to be prototyped.

The opentelemetry-java implementation of file configuration already
accepts YAML encoding and performs environment variable substitution as
described in this PR. It does not support JSON, and I don't think we
should unless there is good reason. I omitted the JSON file format
because I don't know of any prototypes that permit it. We should add
JSON once a language implements it and explores how environment variable
substitution works with JSON.
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
…telemetry#3744)

Part of incorporating [OTEP
open-telemetry#225](open-telemetry/oteps#225) into the
specification.

Followup to open-telemetry#3437.

The adds the YAML file format, and leaves an open TODO for the JSON
format discussed in the original OTEP. It also define environment
variable substitution. IMO its necessary to define environment variable
substitution at the same time as file format because they interact in
ways that aren't immediately obvious and need to be prototyped.

The opentelemetry-java implementation of file configuration already
accepts YAML encoding and performs environment variable substitution as
described in this PR. It does not support JSON, and I don't think we
should unless there is good reason. I omitted the JSON file format
because I don't know of any prototypes that permit it. We should add
JSON once a language implements it and explores how environment variable
substitution works with JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Related to configuring the SDK area:sdk Related to the SDK
Development

Successfully merging this pull request may close these issues.

9 participants