Skip to content

[exporter/elasticsearch]: add dynamic data stream routing for connectors#44525

Merged
ChrsMark merged 6 commits intoopen-telemetry:mainfrom
rogercoll:extend_ds_regex
Dec 10, 2025
Merged

[exporter/elasticsearch]: add dynamic data stream routing for connectors#44525
ChrsMark merged 6 commits intoopen-telemetry:mainfrom
rogercoll:extend_ds_regex

Conversation

@rogercoll
Copy link
Contributor

@rogercoll rogercoll commented Nov 25, 2025

Description

Extends the data stream dynamic routing rules to include telemetry generated/instrumented by a connector (scope name).

Link to tracking issue

Fixes #44525

Testing

Documentation

@rogercoll rogercoll changed the title feat: add dynamic data stream routing for connectors [exporter/elasticsearch]: add dynamic data stream routing for connectors Nov 25, 2025
@rogercoll rogercoll marked this pull request as ready for review November 26, 2025 15:58
@rogercoll rogercoll requested a review from a team as a code owner November 26, 2025 15:58
@rogercoll rogercoll requested a review from ChrsMark November 26, 2025 15:58
@ChrsMark
Copy link
Member

ChrsMark commented Dec 4, 2025

@JaredTan95, @carsonip and @lahsivjar please review as codeowners

Copy link
Member

@lahsivjar lahsivjar left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines +18 to +21
var componentsRegex = []*regexp.Regexp{
regexp.MustCompile(`/receiver/(\w+receiver)`),
regexp.MustCompile(`/connector/(\w+connector)`),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: have you considered merging them to 1 regex instead of having 2 regex in a slice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, not a strong opinion, but I decided to go with the slice for better performance based on expected usage (mostly receivers), specifically by prioritizing the early exit logic and avoiding the extra capturing computation.

Copy link
Contributor

@carsonip carsonip left a comment

Choose a reason for hiding this comment

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

approving to unblock as i don't have a strong opinion on 1 regex vs 2 regex

@ChrsMark ChrsMark merged commit aa583f8 into open-telemetry:main Dec 10, 2025
189 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants