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

Alignment with OpenTelemetry Collector configuration #3963

Open
3 of 4 tasks
mx-psi opened this issue Mar 25, 2024 · 3 comments
Open
3 of 4 tasks

Alignment with OpenTelemetry Collector configuration #3963

mx-psi opened this issue Mar 25, 2024 · 3 comments
Assignees
Labels
area:configuration Related to configuring the SDK triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor

Comments

@mx-psi
Copy link
Member

mx-psi commented Mar 25, 2024

I am working on stabilizing the Collector configuration resolution and environment variable support as part of https://github.com/open-telemetry/opentelemetry-collector/milestone/32.

One of my goals is to bring the File Configuration feature in SDKs and the Collector configuration features to be as similar as possible: it is likely that there will be significant overlap between people writing Collector configurations and people writing SDK configurations.

This is intended to be a meta-issue tracking separate issues that affect Collector and SDK compatibility:

@jack-berg jack-berg transferred this issue from open-telemetry/opentelemetry-configuration Mar 25, 2024
@jack-berg jack-berg added the area:configuration Related to configuring the SDK label Mar 25, 2024
@tigrannajaryan
Copy link
Member

@mx-psi I assigned this to you since you are already working on it.

@trask trask added triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor and removed triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor labels Mar 26, 2024
@trask
Copy link
Member

trask commented Mar 26, 2024

@mx-psi @open-telemetry/configuration-maintainers what do you think of moving this meta issue to https://github.com/open-telemetry/opentelemetry-configuration?

EDIT oops! I see @jack-berg just transferred it here

@trask trask added the triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor label Mar 26, 2024
@jack-berg
Copy link
Member

Yeah i think since this concerns the file config spec, and the not the file config model / schema, it belongs in this repo. Some day, we might consider moving the file config schema to opentelemetry-configuration so all related material can be in one repo, similar to what we did moving the OTLP specification to opentelemetry-proto.

jack-berg added a commit that referenced this issue Apr 8, 2024
…bstitution (#3974)

Fixes #3961

## Changes

Allows for the usage of the `${env:ENV}` syntax in SDK file
configuration. This syntax is used in the OpenTelemetry Collector, see
https://opentelemetry.io/docs/collector/configuration/#environment-variables
for more information.

This does not mean that other providers need to be supported; if we want
to allow this we would need to reserve that syntax by rejecting
`${<provider>:URI}` as invalid, since right now it would be left as-is.

* [x] Related issues #3961, part of #3963

---------

Co-authored-by: jack-berg <[email protected]>
@austinlparker austinlparker moved this to Spec Icebox in 🔭 Main Backlog Apr 16, 2024
jack-berg added a commit that referenced this issue May 7, 2024
…ollow (#3973)

Fixes #3962

## Changes

Specifies the YAML schema to follow. A schema is a set of YAML tags
(i.e. types) and a way to assign types.

YAML 1.2 recommends the 'Core schema': the types are those of JSON.
Scalars are resolved as one would expect, see
[here](https://yaml.org/spec/1.2.2/#103-core-schema) for the details.

One important difference with the way that YAML 1.1 used to work is that
integer scalars starting with a `0` are interpreted as being written in
decimal notation; e.g. `0123` parses to the integer 123 instead of the
integer 83 (you can still use octal notation in YAML 1.2 by using
`0o123`). Some YAML parsers deviate from the core schema in how this
works, for example, both of the more commonly used YAML parsing
libraries in Golang parse `0123` as 83
([go-yaml/yaml](https://github.com/go-yaml/yaml?tab=readme-ov-file#compatibility)
and
[goccy/go-yaml](https://github.com/goccy/go-yaml/blob/4653a1bb5c0047bb37280ac341e2f091cb44352f/ast/ast.go#L326)).
**This may make it a bit difficult to strictly follow this requirement
in some languages**.

For non-trivial changes, follow the [change proposal
process](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change).

* [x] Related issues #3962, part of #3963

---------

Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: jack-berg <[email protected]>
jack-berg pushed a commit that referenced this issue May 8, 2024
Updates #3959

## Changes

Adds example for using an integer in hexadecimal notation. The intention
is to show the difference when quoting vs not quoting and make explicit
that quoting means keeping the original representation (we already have
the `true` example but this one has two different representations).

I think this is already implied by the text so this is only a change in
the example.

* [x] Related issues #3959, part of #3963

---------

Co-authored-by: Robert Pająk <[email protected]>
@danielgblanco danielgblanco moved this from Spec - Accepted to Spec - In Progress in 🔭 Main Backlog Jul 15, 2024
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 31, 2024
…bstitution (open-telemetry#3974)

Fixes open-telemetry#3961

## Changes

Allows for the usage of the `${env:ENV}` syntax in SDK file
configuration. This syntax is used in the OpenTelemetry Collector, see
https://opentelemetry.io/docs/collector/configuration/#environment-variables
for more information.

This does not mean that other providers need to be supported; if we want
to allow this we would need to reserve that syntax by rejecting
`${<provider>:URI}` as invalid, since right now it would be left as-is.

* [x] Related issues open-telemetry#3961, part of open-telemetry#3963

---------

Co-authored-by: jack-berg <[email protected]>
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 31, 2024
…ollow (open-telemetry#3973)

Fixes open-telemetry#3962

## Changes

Specifies the YAML schema to follow. A schema is a set of YAML tags
(i.e. types) and a way to assign types.

YAML 1.2 recommends the 'Core schema': the types are those of JSON.
Scalars are resolved as one would expect, see
[here](https://yaml.org/spec/1.2.2/#103-core-schema) for the details.

One important difference with the way that YAML 1.1 used to work is that
integer scalars starting with a `0` are interpreted as being written in
decimal notation; e.g. `0123` parses to the integer 123 instead of the
integer 83 (you can still use octal notation in YAML 1.2 by using
`0o123`). Some YAML parsers deviate from the core schema in how this
works, for example, both of the more commonly used YAML parsing
libraries in Golang parse `0123` as 83
([go-yaml/yaml](https://github.com/go-yaml/yaml?tab=readme-ov-file#compatibility)
and
[goccy/go-yaml](https://github.com/goccy/go-yaml/blob/4653a1bb5c0047bb37280ac341e2f091cb44352f/ast/ast.go#L326)).
**This may make it a bit difficult to strictly follow this requirement
in some languages**.

For non-trivial changes, follow the [change proposal
process](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change).

* [x] Related issues open-telemetry#3962, part of open-telemetry#3963

---------

Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: jack-berg <[email protected]>
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 31, 2024
…y#3975)

Updates open-telemetry#3959

## Changes

Adds example for using an integer in hexadecimal notation. The intention
is to show the difference when quoting vs not quoting and make explicit
that quoting means keeping the original representation (we already have
the `true` example but this one has two different representations).

I think this is already implied by the text so this is only a change in
the example.

* [x] Related issues open-telemetry#3959, part of open-telemetry#3963

---------

Co-authored-by: Robert Pająk <[email protected]>
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 triage:accepted:ready Ready to be implemented. Small enough or uncontroversial enough to be implemented without sponsor
Projects
Status: Spec - In Progress
Development

No branches or pull requests

4 participants