-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Always pass fanout consumers to connector factory functions #7840
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7840 +/- ##
==========================================
+ Coverage 90.82% 91.14% +0.31%
==========================================
Files 296 298 +2
Lines 14840 14912 +72
==========================================
+ Hits 13478 13591 +113
+ Misses 1087 1045 -42
- Partials 275 276 +1
☔ View full report in Codecov by Sentry. |
Thanks for working this out @mwear.
I may be overlooking something but ideally this is where we are able to lean on the interfaces ( If the above makes sense, I am curious whether we need to make all these changes in one PR. In other words, is there anything technically that prevents us from only switching to always pass a fanout consumer into connector factory functions? |
For this PR the only changes we really need are those made in I think we can pare this PR down to just the changes to graph and omit the changes to the tests and we can work on the helpers separately in #7673 (I think I prefer the original naming). |
d331aa3
to
b543fc6
Compare
overall I think this is a good PR, LGTM after fixing the comment. |
the too few pipelines issue was resolved by open-telemetry#7840
the too few pipelines issue was resolved by open-telemetry#7840
Now that open-telemetry/opentelemetry-collector#7840 merged, we can expect a fanout consumer to be passed consistently to a connector factory. We still check for an error casting the consumer to a connector router, but this would only happen if a breaking change was introduced to the connector internals.
**Description:** This PR introduces a connector version of the routing processor. It currently supports routing based on resource attributes OTTL statements only. Context based routing will be added later in a followup PR. There are two issues regarding fanout consumers that are being addressed in the core repo. * The routing connector needs to be a consumer in multiple pipelines (the routing processor can route to a single exporter). * Will be resolved by: open-telemetry/opentelemetry-collector#7840 * We need the ability to create connector routers to facilitate testing. I had to temporarily copy the fanoutconsumer package into the routing connector codebase due to package visibility issues. * Will be resolved by: open-telemetry/opentelemetry-collector#7673 We can address these issues as the relevant PRs land on the core repo. cc: @djaglowski, @jpkrohling, @kovrus **Link to tracking Issue:** #19738 **Testing:** Unit / manual **Documentation:** The readme has been ported from the routing processor --------- Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com> Co-authored-by: Ruslan Kovalov <ruslan.kovalov@grafana.com>
Description:
This is an implementation of #7673 (comment) which resolves some inconsistencies regarding fanout consumers and connectors. It updates the connector code to always pass a fanout consumer to connector factory functions (even if the connector emits to a single pipeline). This will likely pair with the work in #7673 to add helpers to construct connector routers (when needed) for tests.
Link to tracking Issue: #7672, #7673
Testing:
Unit testing
cc: @bogdandrutu @djaglowski