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

adding instrumentation configuration #91

Merged
merged 13 commits into from
Jun 17, 2024

Conversation

brettmc
Copy link
Contributor

@brettmc brettmc commented May 20, 2024

Initial draft of adding instrumentation configuration.

Closes: #87

schema/instrumentation.json Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
schema/instrumentation.json Outdated Show resolved Hide resolved
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Left a few comments to add documentation to the updates to the kitchen-sink.yaml. Can you follow that comment format for all the new properties?

examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Show resolved Hide resolved
examples/kitchen-sink.yaml Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
@brettmc brettmc marked this pull request as ready for review May 25, 2024 02:24
@brettmc brettmc requested a review from a team May 25, 2024 02:24
@brettmc
Copy link
Contributor Author

brettmc commented May 27, 2024

Just FYI, I'm going to be offline on vacation for a couple of weeks and won't be able to work on this.

@jack-berg
Copy link
Member

Just FYI, I'm going to be offline on vacation for a couple of weeks and won't be able to work on this.

Not sure if you'll see this, but I'd like to pick this up and run with it if you don't mind me pushing some commits to your branch.

@brettmc
Copy link
Contributor Author

brettmc commented May 28, 2024

Not sure if you'll see this, but I'd like to pick this up and run with it if you don't mind me pushing some commits to your branch.

No problem at all!

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.

How do others feel about keeping the separator consistent using _? I worry that it would make usability more difficult if we support a mix of _ and -

@jack-berg
Copy link
Member

How do others feel about keeping the separator consistent using _? I worry that it would make usability more difficult if we support a mix of _ and -

👍 let's add it to schema modeling rules

@jack-berg
Copy link
Member

I pushed a commit to tweak a few things. Have a look folks! If we can get this merged, the next step is to start a conversation about figuring out how instrumentations can actually access this configuration via APIs.

examples/kitchen-sink.yaml Outdated Show resolved Hide resolved
schema/instrumentation.json Show resolved Hide resolved
examples/kitchen-sink.yaml Show resolved Hide resolved
@jack-berg
Copy link
Member

jack-berg commented Jun 4, 2024

@open-telemetry/configuration-maintainers PTAL when you can. Will merge thursday 6/6/24 if there are no additional comments. Thanks!

@jack-berg jack-berg merged commit 6709017 into open-telemetry:main Jun 17, 2024
2 checks passed
jack-berg added a commit to open-telemetry/opentelemetry-specification that referenced this pull request Aug 15, 2024
Resolves #3535.

This introduces an API component to file configuration, which has been
limited to SDK (i.e. end user facing) up until this point.

The configuration model recently added the first surface area related to
instrumentation configuration properties in
open-telemetry/opentelemetry-configuration#91.

The API proposed in this PR is collectively called the "Instrumentation
config API", and provides a mechanism for instrumentation libraries to
participate in file configuration and read relevant properties during
initialization. The intent is for both OpenTelemetry-authored and native
instrumentation alike to be able to be configured by users in a standard
way. New API surface area is necessary to accomplish this to avoid
instrumentation libraries from needing to take a dependency on SDK
artifacts.

The following summarizes the additions:

- Introduce ConfigProvider, the instrumentation config API analog of
TracerProvider, MeterProvider, LoggerProvider. This is the entry point
to the API.
- Define "Get instrumentation config" operation for ConfigProvider. This
returns something called ConfigProperties, which is a programmatic
representation of a YAML mapping node. The ConfigProperties returned by
"Get instrumentation config" represents the
[`.instrumentation`](https://github.com/open-telemetry/opentelemetry-configuration/blob/670901762dd5cce1eecee423b8660e69f71ef4be/examples/kitchen-sink.yaml#L438-L439)
node defined in a config file.
- Rebrand "file configuration" to "declarative configuration". This
expresses the intent without coupling to the file representation, which
although will be the most popular way to consume these features is just
one possible way to represent the configuration model and use these
tools.
- Break out dedicated `api.md`, `data-model.md`, and `sdk.md` files for
respective API, data model, and SDK portions of declarative
configuration. This aligns with other portions of the spec. The
separation should improve clarity regarding what should and should not
be exposed in the API.

I've prototyped this new API in `opentelemetry-java` here:
open-telemetry/opentelemetry-java#6549

cc @open-telemetry/configuration-maintainers,
@open-telemetry/specs-semconv-maintainers
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
Resolves open-telemetry#3535.

This introduces an API component to file configuration, which has been
limited to SDK (i.e. end user facing) up until this point.

The configuration model recently added the first surface area related to
instrumentation configuration properties in
open-telemetry/opentelemetry-configuration#91.

The API proposed in this PR is collectively called the "Instrumentation
config API", and provides a mechanism for instrumentation libraries to
participate in file configuration and read relevant properties during
initialization. The intent is for both OpenTelemetry-authored and native
instrumentation alike to be able to be configured by users in a standard
way. New API surface area is necessary to accomplish this to avoid
instrumentation libraries from needing to take a dependency on SDK
artifacts.

The following summarizes the additions:

- Introduce ConfigProvider, the instrumentation config API analog of
TracerProvider, MeterProvider, LoggerProvider. This is the entry point
to the API.
- Define "Get instrumentation config" operation for ConfigProvider. This
returns something called ConfigProperties, which is a programmatic
representation of a YAML mapping node. The ConfigProperties returned by
"Get instrumentation config" represents the
[`.instrumentation`](https://github.com/open-telemetry/opentelemetry-configuration/blob/670901762dd5cce1eecee423b8660e69f71ef4be/examples/kitchen-sink.yaml#L438-L439)
node defined in a config file.
- Rebrand "file configuration" to "declarative configuration". This
expresses the intent without coupling to the file representation, which
although will be the most popular way to consume these features is just
one possible way to represent the configuration model and use these
tools.
- Break out dedicated `api.md`, `data-model.md`, and `sdk.md` files for
respective API, data model, and SDK portions of declarative
configuration. This aligns with other portions of the spec. The
separation should improve clarity regarding what should and should not
be exposed in the API.

I've prototyped this new API in `opentelemetry-java` here:
open-telemetry/opentelemetry-java#6549

cc @open-telemetry/configuration-maintainers,
@open-telemetry/specs-semconv-maintainers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for instrumentation configuration?
5 participants