-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[exporter/loadbalancing] feat(lb): Introduce the ability to load balance on composite keys in lb #36567
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
Merged
Merged
[exporter/loadbalancing] feat(lb): Introduce the ability to load balance on composite keys in lb #36567
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1184557
feat(lb): Introduce the ability to load balance on composite keys in lb
andrewhowdencom dc20086
add changelog
jpkrohling d906817
Merge branch 'main' into jpkrohling/issue35320
atoulme cb82d9f
Merge branch 'main' into jpkrohling/issue35320
jpkrohling 0c4e518
Merge branch 'main' into jpkrohling/issue35320
jpkrohling 2aadce8
Update exporter/loadbalancingexporter/trace_exporter_test.go
atoulme 7079d6c
Merge branch 'main' into jpkrohling/issue35320
atoulme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.chloggen/jpkroehling_lbexporter-route-with-composite-keys.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
change_type: enhancement | ||
component: exporter/loadbalancing | ||
note: Add support for route with composite keys | ||
issues: [35320] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,11 +114,13 @@ Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using th | |
* This resolver currently returns a maximum of 100 hosts. | ||
* `TODO`: Feature request [29771](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29771) aims to cover the pagination for this scenario | ||
* The `routing_key` property is used to specify how to route values (spans or metrics) to exporters based on different parameters. This functionality is currently enabled only for `trace` and `metric` pipeline types. It supports one of the following values: | ||
* `service`: Routes values based on their service name. This is useful when using processors like the span metrics, so all spans for each service are sent to consistent collector instances for metric collection. Otherwise, metrics for the same services are sent to different collectors, making aggregations inaccurate. | ||
* `service`: Routes values based on their service name. This is useful when using processors like the span metrics, so all spans for each service are sent to consistent collector instances for metric collection. Otherwise, metrics for the same services are sent to different collectors, making aggregations inaccurate. In addition to resource / span attributes, `span.kind`, `span.name` (the top level properties of a span) are also supported. | ||
* `attributes`: Routes based on values in the attributes of the traces. This is similar to service, but useful for situations in which a single service overwhelms any given instance of the collector, and should be split over multiple collectors. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This attributes key should be added to the routing_key table at the top of the document. |
||
* `traceID`: Routes spans based on their `traceID`. Invalid for metrics. | ||
* `metric`: Routes metrics based on their metric name. Invalid for spans. | ||
* `streamID`: Routes metrics based on their datapoint streamID. That's the unique hash of all it's attributes, plus the attributes and identifying information of its resource, scope, and metric data | ||
* loadbalancing exporter supports set of standard [queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md), but they are disable by default to maintain compatibility | ||
* The `routing_attributes` property is used to list the attributes that should be used if the `routing_key` is `attributes`. | ||
|
||
Simple example | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Reading through this doc, I believe this sentence was intended for the attributes routing_key, not service:
In addition to resource / span attributes,
span.kind
,span.name
(the top level properties of a span) are also supported.