Skip to content

Conversation

@dhruv-shah-sumo
Copy link
Collaborator

@dhruv-shah-sumo dhruv-shah-sumo commented Oct 31, 2025

0.136.* version of otel collector does not support routing processor, the routing processor is being moved to routing connector. This PR changes the routing config for metrics.

OSC-1217

Checklist

  • Changelog updated or skip changelog label added
  • Template tests added for new features
  • Integration tests added or modified for major features

@dhruv-shah-sumo dhruv-shah-sumo requested a review from a team as a code owner October 31, 2025 04:59
@dhruv-shah-sumo dhruv-shah-sumo changed the title chore(deps): Migrate routing processor to routing connector for metri… chore(deps): Migrate routing processor to connector for metrcs collection Oct 31, 2025
@dhruv-shah-sumo dhruv-shah-sumo force-pushed the dhruv/metric-routingc-connector branch from 23298c4 to c88ce92 Compare October 31, 2025 05:26
@dhruv-shah-sumo dhruv-shah-sumo changed the title chore(deps): Migrate routing processor to connector for metrcs collection chore(deps): Migrate routing processor to connector for metrics collection Oct 31, 2025
@dhruv-shah-sumo dhruv-shah-sumo force-pushed the dhruv/metric-routingc-connector branch 4 times, most recently from dca7728 to cbaa141 Compare October 31, 2025 07:15
Copy link
Contributor

@rnishtala-sumo rnishtala-sumo left a comment

Choose a reason for hiding this comment

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

@dhruv-shah-sumo its a good idea for this to be its own PR - lets add a changelog for this. I think this migration should be called out as a feature instead of chore, because it makes non-trivial changes to the otel configuration. This is also currently a breaking change, but it doesn't need to be.

- metrics/sumologic/default
table:
- pipelines:
- metrics/apiserver
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add an additional exporter in the input table and verify that it shows up in the table here?

Copy link
Contributor

Choose a reason for hiding this comment

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

could also put the output in the description ^^ or a jira, so in the future, someone has more visual context

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could we add an additional exporter in the input table and verify that it shows up in the table here?

metrics routing does not expose options to add custom exporters but logs do. To increase the testing, I have enabled debug exporter so that you can see the metrics/debug pipeline being created & added to the expected output routing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

could also put the output in the description ^^ or a jira, so in the future, someone has more visual context

@chan-tim-sumo Do you mean the after/before config changes for this migration?

Copy link
Contributor

Choose a reason for hiding this comment

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

after config changes (i assume before and after SHOULD be the same anyways)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@chan-tim-sumo No, they will be different. I'll put both.

## ## see routing processor documentation for more details:
## ## https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/aee4b75100530bce7edbf736fbcf76ac4f6ced6d/processor/routingprocessor/README.md#tech-preview-opentelemetry-transformation-language-statements-as-routing-conditions
## ## exporters is an array of the exporter
## exporters:
Copy link
Contributor

@rnishtala-sumo rnishtala-sumo Oct 31, 2025

Choose a reason for hiding this comment

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

@rnishtala-sumo rnishtala-sumo changed the title chore(deps): Migrate routing processor to connector for metrics collection feat(routing): Migrate routing processor to connector for metrics collection Oct 31, 2025
@dhruv-shah-sumo dhruv-shah-sumo force-pushed the dhruv/metric-routingc-connector branch 3 times, most recently from 35485f2 to a329478 Compare November 3, 2025 12:05
@dhruv-shah-sumo dhruv-shah-sumo force-pushed the dhruv/metric-routingc-connector branch 4 times, most recently from bad9697 to 90e9288 Compare November 21, 2025 08:37
…cs collection

Usage of routing connector is feature flagged and will be kept off/false by default.
After sufficient notices and release notes, the feature flag to use routing connector in
metrics collection will be turned on.

Routing processor is currently removed from the otelcol-contrib version upstream, but
to handle the migration better, sumo is still keeping routing processor in its version
of otel col.

Signed-off-by: Dhruv Shah <dhruv.shah@sumologic.com>
@dhruv-shah-sumo dhruv-shah-sumo force-pushed the dhruv/metric-routingc-connector branch from 90e9288 to 83f3b0a Compare November 21, 2025 08:57
@Gourav2906 Gourav2906 requested a review from Copilot November 23, 2025 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the OpenTelemetry Collector routing configuration from using a routing processor to a routing connector for metrics collection, necessitated by version 0.136.* of the OTel collector removing support for the routing processor. The migration is controlled by a new useRoutingConnectors flag that defaults to false for backward compatibility.

Key Changes:

  • Introduces sumologic.metrics.useRoutingConnectors configuration flag to enable the new routing connector approach
  • Adds routing connector configuration that replaces the processor-based routing when enabled
  • Updates pipeline definitions to use connectors instead of processors when the flag is enabled

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
deploy/helm/sumologic/values.yaml Adds useRoutingConnectors flag and updates documentation comments from processor to connector terminology
deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml Conditionally disables routing processor when useRoutingConnectors is enabled
deploy/helm/sumologic/conf/metrics/otelcol/pipeline.yaml Updates exporter configuration to use routing connector when flag is enabled
deploy/helm/sumologic/conf/metrics/otelcol/connectors.yaml New file defining routing connector configuration with job-based routing rules
deploy/helm/sumologic/conf/metrics/otelcol/config.yaml Adds connector section and defines individual metric pipelines when routing connectors are enabled
deploy/helm/sumologic/README.md Documents the new useRoutingConnectors configuration parameter
tests/helm/metrics_test.go Adds test coverage for routing connector behavior and validates both connector and processor modes
tests/helm/testdata/goldenfile/metadata_metrics_otc/*.yaml Golden test files validating the generated configurations
ci/check_configuration_keys.py Adds new configuration key to allowlist
.changelog/4025.added.txt Changelog entry for the migration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +471 to +472
## routing connector expects you to define a pipeline, but here the user can just mention the exporter.
## The helm deployment would convert exporters into correct pipelines and configure the connectors.
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

The comment on line 471 refers to 'exporters' but the example above it shows a 'pipelines' array (line 467). This is confusing since the comment suggests users specify exporters but the example shows pipelines. The comment should clarify the relationship between what users specify and what gets generated, or the example should be updated to match the comment.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
chore(deps): Migrate routing processor to routing connector for metrics collection No newline at end of file
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

The changelog entry uses 'chore(deps)' prefix but this is a feature addition ('feat'), not a dependency update. Based on the PR title 'feat(routing): Migrate routing processor to connector for metrics collection', the changelog should use 'feat(routing)' instead.

Suggested change
chore(deps): Migrate routing processor to routing connector for metrics collection
feat(routing): Migrate routing processor to routing connector for metrics collection

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

@dhruv-shah-sumo Please make the changelog text same as PR title

@jagan2221
Copy link
Contributor

Looks good!
Also Once helm chart is released, please ensure that our internal k8s collection(zaidan via collection-gitops) has this flag enabled((Stag first followed by other deployments)) which helps us in catching any issues internally.
@dhruv-shah-sumo

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.

5 participants