Skip to content

[Feature] Implement ORCA metrics #437

Description

@sleipnir

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_report so 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions