i.o.exporter.internal.http.HttpExporter : Failed to export spans. Server responded with HTTP status code 404. Error message: Unable to parse response

What I am trying ot achieve:

I am trying to send traces to grafana cloud tempo using http.

Show some code:

this code is using, but it is using GRPC:

@Bean
    public SpanExporter primaryOtlpGrpcSpanExporter() {
        return OtlpGrpcSpanExporter.builder()
                .setEndpoint("https://tempo-us-central1.grafana.net:443")
                .addHeader("Authorization", "Basic ODEwNzcxOm[...]xOQ==")
                .build();
    }

I would like to use http instead of GRPC.

Hence, I used:

 @Bean
    public SpanExporter primaryOtlpGrpcSpanExporter() {
        return OtlpHttpSpanExporter.builder()
                .setEndpoint("https://tempo-us-central1.grafana.net:443/v1/traces")
                .addHeader("Authorization", "Basic ODE[...]D0=")
                .build();
    }

Describe actual results:

With the Http exporter above, I am getting

2025-05-13T08:49:55.458+08:00 [question,,]  WARN 16994 --- [httptry] [grafana.net/...] [   ] i.o.exporter.internal.http.HttpExporter  : Failed to export spans. Server responded with HTTP status code 404. Error message: Unable to parse response body, HTTP status message: 

Using this URL, I would get 405: https://tempo-us-central1.grafana.net:443

Describe expected result:

I would like to be able to send traces via Http protocol, and see the trace in Grafana cloud tempo.

Question:

What is the correct URL to send traces via http?

You’re seeing the 404 and 405 errors because Grafana Cloud Tempo does not support OTLP over HTTP, only OTLP over gRPC.

Straight Answer:

Grafana Cloud Tempo requires OTLP/gRPC. There is no HTTP endpoint for OTLP ingestion.

So this line is correct:

OtlpGrpcSpanExporter.builder()
    .setEndpoint("https://tempo-us-central1.grafana.net:443")

And this line is incorrect (will always fail):

OtlpHttpSpanExporter.builder()
    .setEndpoint("https://tempo-us-central1.grafana.net:443/v1/traces")

Why HTTP doesn’t work

  • The OTLP/HTTP spec defines sending traces to /v1/traces
  • But Grafana Cloud Tempo does not expose that endpoint
  • Grafana only listens for OTLP via gRPC

What you should do

Stick with this setup:

@Bean
public SpanExporter primaryOtlpGrpcSpanExporter() {
    return OtlpGrpcSpanExporter.builder()
        .setEndpoint("https://tempo-us-central1.grafana.net:443")
        .addHeader("Authorization", "Basic <your-token>")
        .build();
}

And do not use OtlpHttpSpanExporter — it won’t work with Grafana Cloud Tempo.

Summary

  • Correct protocol for Grafana Tempo Cloud: gRPC
  • Incorrect / unsupported: OTLP/HTTP
  • There is no working HTTP URL for sending OTLP traces to Grafana Cloud Tempo

Let me know if you need help setting this up with Spring Boot’s OpenTelemetry auto-config.