-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Is your feature request related to a problem? Please describe.
Currently, elixir-grpc does not provide native support for exposing custom metrics following the official gRPC specification for Custom Backend Metrics (ORCA - Open Request Cost Aggregation). This makes it difficult to integrate with load balancers that rely on such metrics for smarter routing decisions, especially in high-scale environments with heterogeneous workloads.
Describe the solution you'd like
Add support for the ORCA protocol as defined in the official gRPC specification:
https://grpc.io/docs/guides/custom-backend-metrics/
and complementarily here:
https://github.com/cncf/xds/blob/main/xds/data/orca/v3/orca_load_report.proto
The goal is to enable Elixir gRPC servers to:
- Inject custom metrics either per request or at the connection level.
- Expose those metrics via
orca_load_reportso that compatible clients and load balancers can consume them. - Provide a simple configuration option in the Elixir gRPC server to enable/disable custom metrics.
- Offer hooks/extensions for developers to add their own backend-specific metrics.
Describe alternatives you've considered
- Using only external metrics through Prometheus/OpenTelemetry, but this does not solve the native integration problem with load balancers expecting ORCA (e.g., xDS, Envoy).
- Building custom middleware outside of
elixir-grpc, but this increases complexity and diverges from the expected gRPC ecosystem standards.
Additional context
- gRPC documentation: https://grpc.io/docs/guides/custom-backend-metrics/
- ORCA specification: https://github.com/cncf/xds/blob/main/xds/data/orca/v3/orca_load_report.proto
- This feature already exists in other official gRPC SDKs, and adding it to
elixir-grpcwould bring parity and enable better integration in multilingual scenarios.