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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
68868a8
Define file configuration parse and configure operations
jack-berg Apr 24, 2023
5e5cb37
Add changelog entry
jack-berg Apr 24, 2023
648d9eb
Merge branch 'main' into parse-and-configure
jack-berg Apr 26, 2023
eeee405
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg May 2, 2023
53003fa
Rename Configurer to ConfigurationProvider
jack-berg May 2, 2023
f71a591
Merge branch 'parse-and-configure' of https://github.com/jack-berg/op…
jack-berg May 2, 2023
b58b4aa
Fix broken link
jack-berg May 2, 2023
87ef455
Merge branch 'main' into parse-and-configure
jack-berg May 5, 2023
5d715dd
PR feedback
jack-berg May 12, 2023
b530ee7
Merge branch 'parse-and-configure' of https://github.com/jack-berg/op…
jack-berg May 12, 2023
181f8fa
Merge branch 'main' into parse-and-configure
jack-berg May 12, 2023
a72e497
Rename to ConfigurationInterpreter
jack-berg May 17, 2023
f8a20c6
Merge branch 'parse-and-configure' of https://github.com/jack-berg/op…
jack-berg May 17, 2023
d5b9675
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg Sep 18, 2023
2f880d1
Rename to ConfigurationFactory
jack-berg Sep 18, 2023
0b402e2
remove API
jack-berg Sep 18, 2023
488784f
Rename to Configurator
jack-berg Sep 19, 2023
aabc0cc
fix typo
jack-berg Oct 4, 2023
8e861b2
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg Oct 4, 2023
a475548
Remove configurator, describing operations as pure functions
jack-berg Oct 11, 2023
2719093
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg Oct 11, 2023
5298301
Merge branch 'main' into parse-and-configure
jack-berg Oct 13, 2023
ec34b1e
Fix changelog
jack-berg Oct 13, 2023
721cee7
Merge branch 'parse-and-configure' of https://github.com/jack-berg/op…
jack-berg Oct 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ release.

### SDK Configuration

- Define file configuration parse and create operations.
([#3437](https://github.com/open-telemetry/opentelemetry-specification/pull/3437))

### Common

### Supplementary Guidelines
Expand Down
52 changes: 49 additions & 3 deletions specification/configuration/file-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ linkTitle: File
- [SDK Configuration](#sdk-configuration)
* [In-Memory Configuration Model](#in-memory-configuration-model)
* [Operations](#operations)
+ [Parse](#parse)
+ [Create](#create)
- [References](#references)

<!-- tocstop -->
Expand Down Expand Up @@ -66,10 +68,54 @@ name `Configuration` is RECOMMENDED.

### Operations

TODO: define how to parse configuration file to configuration model
SDK implementations of configuration MUST provide the following operations.

TODO: define how to apply configuration model to produce configured sdk
components
Note: Because these operations are stateless pure functions, they are not
defined as part of any type, class, interface, etc. SDKs may organize them in
whatever manner is idiomatic for the language.

TODO: Add operation to update SDK components with new configuration for usage
with OpAmp

#### Parse

Parse and validate a [configuration file](#configuration-file).
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

**Parameters:**

* `file`: The [configuration file](#configuration-file) to parse. This MAY be a
file path, or language specific file data structure, or a stream of a file's content.

**Returns:** [configuration model](#in-memory-configuration-model)

This SHOULD return an error if:

* The `file` doesn't exist or is invalid
* The parsed `file` content does not conform to
the [configuration model](#configuration-model) schema.
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

TODO: define behavior if some portion of configuration model is not supported

#### Create

Interpret [configuration model](#in-memory-configuration-model) and return SDK components.

**Parameters:**

* `configuration` - The configuration model.
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

**Returns:** Top level SDK components:
jack-berg marked this conversation as resolved.
Show resolved Hide resolved

* `TracerProvider`
* `MeterProvider`
* `LoggerProvider`
* `Propagators`

The multiple responses MAY be returned using a tuple, or some other data
structure encapsulating the components.

This SHOULD return an error if it encounters an error in `configuration` (i.e.
fail fast).

## References

Expand Down