-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[otelcol] Prevent overwriting of pipelines #1142
[otelcol] Prevent overwriting of pipelines #1142
Conversation
Hello @djaglowski, thanks for that! This is actually a problem that is there for some time already: open-telemetry/opentelemetry.io#3065 Your approach would solve it in a better way! |
Thanks for the feedback @julianocosta89. I've added a changelog and proposed open-telemetry/opentelemetry.io#3311 to update the docs. It's not clear to me if the same changes need to be applied to the kubernetes/helm config & docs because it seems users may be more inclined to modify the primary config directly. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Regarding the Helm chart I do agree with you. |
I'm not quite clear on the use case we are trying to solve for here. We have The demo should strive to try and adhere to idiomatic conventions where possible on how people should be instrumenting and managing the associated telemetry for their applications. The collector configuration in this PR significantly complicates the configuration away from those conventions. I think we should clarify how to extend the telemetry pipeline in docs using |
My use case is as follows: I'd like to export all telemetry data via one additional exporter.
The problem is that we're asking users to write configuration in the This is not simple or idiomatic in my opinion. Anecdotally, I'm a maintainer of the collector but I still spent hours struggling to accomplish my use case because I was of a mind that I could make additive changes in one file without needing to be concerned for the others. To oversimplify the situation in order to highlight the problem, we basically have the following: # otelcol-config.yaml
exporters: [a, b]
# otelcol-observability.yaml
exporters: [a, b, c]
# otelcol-extras.yaml
# Add whatever you want to "exporters"!
exporters: [z] # User "added" z The end result here is that
Effectively, we're presenting the
I think whatever conventions we were trying follow were misguided and will lead to frustration more often than results. I agree that my proposed changes are more complicated, if the goal is for novice users to grasp the totality of the configuration. However, if the goal is to make it easy for new users to add their own backend, then I think what I've proposed is a much more reliable solution.
There is an accompanying PR here which I believe clarifies the expectations for those running with docker compose. The issue you mentioned appears to specifically relate to the kubernetes equivalent. I'd rather defer to others as to whether the same changes make sense there, but my intuition was that it is less of an issue. |
I have to disagree @puckpuck. The point 1 is that we have some users struggling to use the service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/example] And breaks the By simply creating a new pipeline we would avoid breaking the default ones: service:
pipelines:
traces/byob:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/example] But in this approach we would have to duplicate everything. In the suggested solution, we demonstrate a new connector and the code below wouldn't break anything: service:
pipelines:
traces/example:
receivers: [forward]
processors: [] # optional
exporters: [otlphttp/example] Another great point of the |
I have also struggled quite a bit with the current Collector config. I like this new proposal because when bringing a new backend, I don't need to care what's in the To help users with this new setup, a picture would be nice, showing the forward connector and 3 different config files, with an example pipeline to the user’s own backend. |
My issue is this will complicate a collector configuration that people use as a reference implementation to make it slightly easier to bring your backend. And even that slightly easier, I will argue, since people will need to know to use This PR is just trading one problem (documenting spanmetrics in exporter) with another (documenting forward in receiver), while also making the reference configuration far more complicated. This is what Honeycomb does for bring your own backend, all configured in |
The problem I'm trying to solve is neither of these. In any case, I think that if the goal is to provide a simple reference implementation, there should be only one config file so that no merging is necessary. |
We only do the merging to make it easier to bring your own backend. We should probably add comments to the other files instructing people not to modify them and instead add what they want to the |
The whole point is that modifying |
Kind of. It really only clobbers arrays. The same is true when working with Helm charts, where part of the inspiration for this approach was adopted. We have 3 files because we wanted:
Where we failed is we did not document this in any capacity anywhere. It was just discussed in SIG meetings and implemented. We should document this as both comments in the config files, and on the website for the demo itself. The only "gotcha" is we need to be clear that if overriding the exporter in the traces pipeline, you need to include spanmetrics or an error will occur. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Changes
Currently, some elements of the pipelines defined in
otelcol-config.yml
are clobbered by conflicting definitions inotelcol-observability.yml
. Specifically, the exporters list in thetraces
andmetrics
pipelines.Since we expect users to customize the configuration in many cases, I see the following issues:
otelcol-config.yml
, it has no effect. There's no error or obvious way to detect this - it's just silently ignored.otelcol-config.yml
are effectively ignored so they could be deleted. However, this would mean that it is not a valid config file on its own. i.e. A user who excludesotelcol-observability.yml
may be surprised to find that this breaks the service.The solution I'm proposing uses the
forward
connector to mostly decouple the two files.otelcol-config.yml
is split into two, connected by theforward
connector. One pipeline receives and processes data. The other exports. The functionality is the same, but the pipelines are no long clobbered and its possible to excludeotelcol-observability.yml
.otelcol-observability.yml
are separated from those inotelcol-config.yml
. Instead, they receive data fromforward
connector. This allows any additional components to be added to pipelines in either file without conflicts.The downside of this approach is that it increases the apparent complexity of the configuration. This may be a barrier to entry for some users, even if it is less error prone.
Merge Requirements
For new features contributions please make sure you have completed the following
essential items:
CHANGELOG.md
updated to document new feature additionsMaintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.