Add Distribution section for vendor-specific settings#433
Add Distribution section for vendor-specific settings#433jack-berg merged 8 commits intoopen-telemetry:mainfrom
Conversation
marcalff
left a comment
There was a problem hiding this comment.
Please describe what the yaml parser implemented in each SDK is supposed to do with this.
It’s related to another repository: opentelemetry-specification The plan is to create a separate PR in Currently, the Now, to directly answer to your question about what the parser should do: I understand your concern might be about implementing this in C++, since not knowing the exact structure of the node in advance can be problematic for static typing. |
|
Thanks for the details. See my comments / questions on the related issue. |
|
I think it would be good to update also kitchen-sink.yaml example |
zeitlinger
left a comment
There was a problem hiding this comment.
Java agent and spring starter currently have some settings under agent and spring_starter, e.g. debug.
I think it should stay that way to make it clear that a vendor can have a distribution of the agent or starter.
For example:
- spring starter has
spring_starter/debug - parts unlimited has
parts_unlimited/part_details- you can still use
spring_starter/debug- and don't have to move it toparts_unlimited/debug
- you can still use
@trask since we talked about it
| This section provides a standardized location for distribution-specific settings | ||
| that are not part of the OpenTelemetry configuration model. | ||
| It allows vendors to expose their own extensions and general configuration options. | ||
| If omitted, noop distribution settings are used. |
There was a problem hiding this comment.
| If omitted, noop distribution settings are used. | |
| If omitted, noop distribution settings are used. | |
| The OpenTelemetry Java Agent and Spring Boot Starter should not use this field. |
There was a problem hiding this comment.
I don’t think it’s worth adding Java-specific comments to the general documentation. The best place for that would be the documentation for your implementation.
There was a problem hiding this comment.
we can probably find a more generic wording to explain that this is only for vendor distributions - which might again be a reason to go back to vendor instead of distribution
There was a problem hiding this comment.
Agreed that we should not be adding Java specific language to the configuration file.
There was a problem hiding this comment.
If you feel that distribution is still the right term, then I'm fine.
MrAlias
left a comment
There was a problem hiding this comment.
Overall, this looks good to me outside of the "noop distribution" issue. Once that is resolved this looks ready.
| $ref: "#/$defs/ExperimentalInstrumentation" | ||
| description: | | ||
| Configure instrumentation. | ||
| distribution: |
There was a problem hiding this comment.
Should this be distribution/development, and reference #/$defs/ExperimentalDistribution?
With stability coming soon, we had better be sure about anything which isn't marked experimental. Makes me nervous to have new concepts which will be stable out of the gate.
There was a problem hiding this comment.
I'm not sure why this need to be marked as unstable, since there are no configurations for OpenTelemetry inside the node. Everything used there relies on vendor-specific configurations. The only thing that might be unstable on the OpenTelemetry side is the name of this node. Should we really mark it as development just because of that?
There was a problem hiding this comment.
I'm not sure why this need to be marked as unstable
The argument is that its a new concept that has not been leveraged anywhere. If we mark it stable and get it wrong, we're stuck with it forever. OpenTelemetry tends to be conservative.
With that said, distributions are not a new concept in otel and we've been contending where to put distribution specific configuration for a while. I don't think we'll come with a different answer.
| example: | ||
| property: "value" | ||
| distribution: | ||
| example: |
There was a problem hiding this comment.
is example the name of a distribution here? if not, should it be? e.g. in Java Instrumentation we have at least two (upstream) distributions agent and spring_starter, I could see it being helpful to know what kind of config yaml we're looking at
or if not, maybe distribution could have a (mandatory?) name:?
There was a problem hiding this comment.
example is the name of a vendor. For example splunk, grafana, new_relic
There was a problem hiding this comment.
I agree that a distribution cannot be empty and should have at least one vendor name inside it.
There was a problem hiding this comment.
I pushed a commit that ensures this. It also ensures that each entry under distribution is an object, disallowing something like:
distribution:
grafana: bar
Has to be modeled like:
distribution:
grafana:
property: bar
I think this isn't even necessary. Consider that a distribution normally controls the SDK initialization, and therefore has code that will call parse and create. So it would be perfectly reasonable for a distribution to get access to |
So how about distributions that are based on OTel Java Agent, that just extend it with some custom component providers and AgentListeners? If AgentListener needs access to distribution config then it must get it from ConfigProvider. I'm not aware of any other reasonable way to expose distribution config to AgentListener. I already created issue in opentelemtry-specification for planned ConfigProvider changes and I plan to create associated PR there soon. |
The java agent would evolve to provide access to this. Nothing about the java agent's startup flow and callbacks is part of the spec - why would this be any different?
To be clear, I'm not opposed to a spec for this, but I would be amazed if the java SIG didn't evolve its distribution callback APIs to accommodate this, with or without spec changes. |
agree - we could have The most common extension interface is already good to go: DeclarativeConfigurationCustomizer. |
I think we need to solve this issue for other languages as well, not for Java only. ExtendedAgentListener is Java only solution. This is applicable only if distribution specific config is located under |
It's only an example - and other languages can have other solutions.
That's a great point - the Java agent has no way around that, unless the extend ConfigProvider. |
|
Do we need anything else to merge this PR? |
Fixes #336
What
This PR introduces a new top-level
distributionsection.The
distributionsection provides a standardized and explicit location for distribution-specific configuration parameters that are not part of the OpenTelemetry model. It enables OpenTelemetry distributions to define and expose their own extensions and general configuration options in a structured and interoperable way.