Introduce load-balanced channel for OpenTelemetry exporters#2175
Open
dkostyrev wants to merge 2 commits intoTraceMachina:mainfrom
Open
Introduce load-balanced channel for OpenTelemetry exporters#2175dkostyrev wants to merge 2 commits intoTraceMachina:mainfrom
dkostyrev wants to merge 2 commits intoTraceMachina:mainfrom
Conversation
eb9bfe9 to
b86f6d1
Compare
b86f6d1 to
9533feb
Compare
9533feb to
6406230
Compare
Collaborator
|
@dkostyrev Than you for this awesome PR. I have finally had a bit of time to explore it and now I understand quite a bit. This is fantastic. |
Collaborator
|
@amankrx when you get a chance, please help with the merge conflict here. |
amankrx
approved these changes
Mar 5, 2026
MarcusSorealheis
approved these changes
Mar 5, 2026
| .block_on(async { | ||
| // The OTLP exporters need to run in a Tokio context. | ||
| spawn!("init tracing", async { init_tracing() }) | ||
| spawn!("init tracing", async { init_tracing().await }) |
Add client-side load balancing to OTLP gRPC connections using ginepro. When NL_OTEL_ENDPOINT is set, the telemetry system creates a load-balanced channel shared across log, trace, and metric exporters. This enables better distribution of telemetry traffic across multiple OTLP collector instances and improves overall system resilience. - Add ginepro dependency for gRPC load balancing - Upgrade OpenTelemetry dependencies from 0.29 to 0.30 - Change init_tracing() to async to support channel initialization - Add NL_OTEL_ENDPOINT environment variable for configuration - Update all OTLP exporters to use shared load-balanced channel
Member
|
That coverage issue is interesting. |
29cb3d7 to
dff32cd
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR introduces client-side load balancing for OpenTelemetry (OTLP) gRPC connections using the ginepro library. When the
NL_OTEL_ENDPOINT(name to be discussed, maybe boolean flag?) environment variable is set, NativeLink will create a load-balanced channel for exporting logs, traces, and metrics, distributing requests across multiple backend endpoints resolved via DNS. This change allows to distribute OTLP traffic across multiple OTLP collector instances.Changes
Load-balanced OTLP exports:
gineprodependency to provide client-side load balancing for gRPC channels used by OpenTelemetry exportersNL_OTEL_ENDPOINTenvironment variable to configure the OTLP endpoint for load-balanced connectionsinit_tracing()from synchronous to async to support balanced channel initializationThis change is