otlpgrpc: turn on round_robin LB policy and kuberesolver for resolving k8s service endpoints #5731
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.
What this PR does:
For tracing with opentelemetry, Cortex uses otlpgrpc protocol to send traces to OTLP backends.
When you have multiple tracing backends, it is always recommended to have load balancing. Since gRPC is a long lived connection, it is more recommended to do client side loadbalancing. For more details, can refer to https://github.com/grpc/grpc/blob/master/doc/load-balancing.md. In this pr, I added an option to enable
round_robin
policy, by default it ispick_first
.This pr also enables
kuberesolver
support which allows to resolve endpoint with prefixkubernetes://
, for examplekubernetes://opentelemetry-collector.tracing:4317
to be resolved as a k8s service and return the actual endpoint IPs (pod IP). This is helpful becausekuberesolver
watches the backend endpoints changes and allows client side loadbalancing to send requests to newly scaled up pods such as through HPA.Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]