Skip to content

[BUG] OTLP gRPC metrics exporter crashes on startup — GrpcSenderProvider missing from classpath #3217

@Gezi-lzq

Description

@Gezi-lzq

When configuring the OTLP metrics exporter with protocol=grpc, the broker crashes on startup with:

java.lang.IllegalStateException: No GrpcSenderProvider found on classpath.
Please add dependency on opentelemetry-exporter-sender-okhttp or opentelemetry-exporter-sender-grpc-upstream

PR #3124 added opentelemetry-exporter-sender-jdk and excluded opentelemetry-exporter-sender-okhttp from automq-metrics. sender-jdk only provides HttpSenderProvider via SPI — it does not provide GrpcSenderProvider. The only module that registers GrpcSenderProvider is sender-okhttp, which is explicitly excluded.

The OTLPProtocol enum still declares GRPC and OTLPMetricsExporter has a case GRPC branch that compiles (the API classes exist in exporter-otlp), but fails at runtime because no SPI implementation is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions