A TCP connection to a telemetry endpoint can succeed while every export fails. On an Amazon EKS cluster, the load balancer can be reachable, Envoy can serve a valid certificate, and the collector can still receive nothing because the route points to the wrong receiver or the upstream connection speaks the wrong protocol. A production test needs to follow a real export through each of those boundaries and find the resulting data in storage.
In the EKS migration, a shared AWS Network Load Balancer (NLB) exposed two endpoints on the same public hostname. Applications using OTLP/gRPC connected to telemetry.example.com:4317 over TLS. Applications using OTLP/HTTP connected to telemetry.example.com:4318 over TLS. Each port had its own Gateway listener and route attachment. The NLB forwarded TCP traffic to Envoy, which terminated TLS and sent each request to the matching receiver on the collector. All public example names use example.com. Substitute a domain you control when adapting the examples.
How the two transports share an entry point
OpenTelemetry Protocol, or OTLP, defines the messages used to export telemetry. With gRPC, an exporter makes an RPC over HTTP/2. For example, a trace exporter calls the Export method on opentelemetry.proto.collector.trace.v1.TraceService. A GRPCRoute can use that service and method as matching criteria. With OTLP/HTTP, an exporter sends a POST to a signal-specific path such as /v1/traces. An HTTPRoute can match that path and preserve it when forwarding to the receiver. Both transports carry OpenTelemetry data, and each uses its own request framing and response format. OTLP specification · Envoy Gateway gRPC routing.
For native gRPC, a client can receive HTTP status 200 and still get a failed RPC. The gRPC status arrives in trailers, or in a trailers-only response for some immediate failures. A proxy-generated response with a different content type or missing status can also be mapped to a gRPC error by the client library. Record the exporter's final gRPC status and correlate it with proxy logs before attributing a failure to the collector. A dashboard that counts only HTTP status codes can report healthy traffic during a gRPC outage. gRPC over HTTP/2.
| Public endpoint | External transport | Route | Receiver in the example |
|---|---|---|---|
telemetry.example.com:4317 | TLS with HTTP/2 carrying gRPC | GRPCRoute | Alloy gRPC on 4317 |
telemetry.example.com:4318 | TLS carrying OTLP/HTTP | HTTPRoute | Alloy HTTP on 4318 |
There are two connections to configure. The client connects to Envoy through the NLB and negotiates TLS, including the application protocol negotiated through ALPN. Envoy then opens an upstream connection to the collector on the selected Service port. gRPC needs HTTP/2 on that second connection as well. An upstream receiver without TLS speaks cleartext HTTP/2, commonly called h2c. For an upstream receiver using TLS, configure backend TLS and certificate validation to match what the receiver serves. A successful public TLS handshake provides evidence about the first connection. The upstream protocol remains a separate part of the request path. Gateway API GRPCRoute reference · Envoy Gateway API reference.
Listener, route, and Service configuration
The following excerpts illustrate the migration design. Listener names, namespace labels, resource names, path restrictions, and cleartext upstream settings are example choices. The existing Gateway uses the Envoy Gateway class and the NLB infrastructure configuration. Add listeners alongside its existing listeners, with a TLS Secret called telemetry-tls in the Gateway namespace and a certificate valid for telemetry.example.com. Label the namespace that owns the telemetry routes gateway-access=telemetry.
# Gateway default/eg-nlb, excerpt from spec listeners: - name: otlp-grpc hostname: telemetry.example.com port: 4317 protocol: HTTPS tls: mode: Terminate certificateRefs: - name: telemetry-tls allowedRoutes: namespaces: from: Selector selector: matchLabels: gateway-access: telemetry kinds: - kind: GRPCRoute - name: otlp-http hostname: telemetry.example.com port: 4318 protocol: HTTPS tls: mode: Terminate certificateRefs: - name: telemetry-tls allowedRoutes: namespaces: from: Selector selector: matchLabels: gateway-access: telemetry kinds: - kind: HTTPRoute The listener names are the attachment points referenced by sectionName. The gRPC route below has no method match, so it forwards eligible gRPC requests for the hostname to Alloy and lets the collector handle the services it implements. For a traces-only route, add an explicit method match under rules[].matches[].method, with service: opentelemetry.proto.collector.trace.v1.TraceService and method: Export. Apply a restriction like that only where the ingestion contract calls for it. A trace-only match will prevent a general-purpose collector route from carrying logs and metrics. Gateway API route matching · Gateway API GRPCRoute reference.
apiVersion: gateway.networking.k8s.io/v1 kind: GRPCRoute metadata: name: alloy-otlp-grpc namespace: observability spec: parentRefs: - name: eg-nlb namespace: default sectionName: otlp-grpc hostnames: [telemetry.example.com] rules: - backendRefs: - name: alloy port: 4317 --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: alloy-otlp-http namespace: observability spec: parentRefs: - name: eg-nlb namespace: default sectionName: otlp-http hostnames: [telemetry.example.com] rules: - matches: - path: {type: Exact, value: /v1/traces} method: POST - path: {type: Exact, value: /v1/logs} method: POST - path: {type: Exact, value: /v1/metrics} method: POST backendRefs: - name: alloy port: 4318 The route ports refer to ports on the Service in the route's namespace. A Kubernetes Service associates each port with a target port on the selected Pods. In this example, the ports have the same numbers through to the receiver. The gRPC Service port declares cleartext HTTP/2. The HTTP Service port uses the receiver's conventional HTTP endpoint. Scope the Service selector to the Alloy workload you actually run, and check that its EndpointSlices contain ready Pod endpoints. Confirm backend protocol support against the installed controller version before applying the example. Envoy Gateway API reference · Alloy OTLP receiver configuration.
apiVersion: v1 kind: Service metadata: name: alloy namespace: observability spec: selector: app: alloy ports: - name: otlp-grpc port: 4317 targetPort: 4317 appProtocol: kubernetes.io/h2c - name: otlp-http port: 4318 targetPort: 4318 Verify from the exporter to storage
Start with the Kubernetes resources. Inspect the Gateway's listener status and the route's status.parents entries with the commands below. Check the parent namespace, Gateway name, listener section, and controller name. For each relevant condition, compare observedGeneration with the resource's current generation. Look for Accepted=True and ResolvedRefs=True for the intended parent, and check that the Gateway is programmed. Verify both public ports on the generated load balancer Service and inspect the NLB target health. These checks narrow down configuration and provisioning issues before anyone starts changing client settings. Envoy Gateway gRPC routing · AWS Load Balancer Controller NLB guide.
kubectl -n default get gateway eg-nlb -o yaml kubectl -n observability get grpcroute alloy-otlp-grpc -o yaml kubectl -n observability get httproute alloy-otlp-http -o yaml kubectl -n observability get endpointslices \ -l kubernetes.io/service-name=alloy Run a real OTLP exporter from the same environment as a production sender. For an SDK that honors the standard environment variables, the following gRPC settings select transport and endpoint. Supply the required authentication headers through the workload's secret configuration. Emit one sampled trace whose ID you can record, and invoke the application's flush or shutdown mechanism if the test process exits before the normal batch interval. Inspect the exporter result, including a partial-success response if surfaced by the SDK, and look up the trace ID in Tempo. Repeat with http/protobuf and the 4318 endpoint when validating the second listener. OTLP exporter settings · OTLP response semantics.
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc export OTEL_EXPORTER_OTLP_ENDPOINT=https://telemetry.example.com:4317 A general OTLP/HTTP endpoint is a base URL. A conforming SDK appends the signal path, such as /v1/traces. A per-signal endpoint is used as supplied, so include the entire path in OTEL_EXPORTER_OTLP_TRACES_ENDPOINT when overriding traces alone. Check per-signal protocol overrides at the same time. An inherited override can leave one signal using gRPC after the application's general endpoint has moved to HTTP. When a synthetic succeeds but a deployed workload fails, inspect the effective configuration and reproduce the test from the deployed workload's network and trust environment. OTLP exporter URL construction.
When evaluating the authentication boundary, use a controlled sender to try one export with valid credentials and one with credentials omitted. Keep the transport, hostname, payload, and client environment the same between the two tests. An explicit rejection from the receiver demonstrates that the request reached authentication. A connection error needs a different investigation. Use harmless test telemetry for both requests and keep secret header values out of the captured output.
Diagnose the first failing hop
| Symptom | Where to investigate |
|---|---|
| Connection timeout or refusal | Confirm DNS from the client, the public listener port, permitted network traffic, and target health. |
| Certificate or issuer error | Inspect the served chain, the requested server name, and the trust configuration inside the exporting runtime. |
HTTP 404 or gRPC UNIMPLEMENTED | Check listener attachment, hostname, method or path matching, and whether the selected receiver implements the export service. |
| Authentication rejection | Check the exporter header or metadata configuration and whether the collector enables the expected authentication handler. |
Upstream reset or gRPC UNAVAILABLE | Correlate proxy and collector logs, inspect ready endpoints, and verify the protocol and TLS settings on the upstream hop. |
| Successful export with no trace in Tempo | Check the trace ID and query context, then review collector processing, exporter errors, and downstream ingestion. |
When TLS fails on 4317, check the actual hostname and port with a TLS probe that sends SNI and offers h2. Run it from the affected container or an equivalent environment. Inspect the chain and negotiated protocol, then retest using the application exporter. A shell probe and language SDK can use different trust bundles. A probe that succeeds on a workstation therefore provides limited evidence about an exporter running in a managed image. Capture the detailed error before changing endpoint or client configuration so that a working fallback does not erase the evidence needed for later investigation.
If multiple telemetry signals fail together, compare the two listener paths with a single test client configured for each transport in turn. If one transport works and the other fails, begin at the point where their paths diverge. Confirm the failing client's negotiated protocol, the selected route, and the Alloy receiver before investigating shared storage.
For production changes, run a canary export through each enabled transport before switching a fleet. Keep the canary small and use a unique trace ID so an earlier export cannot satisfy the check. Monitor request counts, gRPC status, upstream resets, authentication failures, and collector drops during the rollout. Exercise sustained connections and representative payload sizes as well as the first export from a fresh process. Test the behavior after rotating the public certificate or rolling a proxy replica, since reconnects expose problems that an established channel can hide.
The decisive cutover check is a fresh trace in storage from the same kind of exporter that will use the new endpoint. Combine that evidence with Gateway status and the exporter's response. Together they cover DNS, TLS, listener and route attachment, authentication, upstream HTTP/2 on the gRPC path, and collector delivery to Tempo.
Keep the two public endpoints visible in application deployment checklists. Record the listener section, route name, receiver port, and a recent successful export for each transport. That record speeds up incident triage when a future Gateway change affects only one port. It also gives on-call engineers a concrete way to validate recovery after changing a Service port, a certificate reference, or a namespace label. Preserve the exporter result and trace ID with the change record so the team can distinguish observations from assumptions.
