apollographql / router

A configurable, high-performance routing runtime for Apollo Federation 🚀
https://www.apollographql.com/docs/router/
Other
810 stars 273 forks source link

OTLP exporter port default does not match tonic vs http #5717

Open BrynCooke opened 3 months ago

BrynCooke commented 3 months ago

It looks like Otel does not switch the exdpoint based on if tonic or http builders are used. Instead it is statically determined by feature gate.

This means that anyone who doesn't explicitly specify the endpoint is going to run into trouble.

Worse still, the defaults don't work. So whereas users should just be able to set:

    metrics:
      otlp:
        temporality: delta
        enabled: true

It will actually choose the wrong default port of 3218 which is for use with grpc.

To fix we need to explicitly default the endpoints of otlp rather than relying on otel to do this defaulting.

Geal commented 3 months ago

We need to communicate in the changelog that this is potentially breaking, if customers changed their collection services to the wrong default port of the router (unlikely, but still possible)