# Traces can't be sent over gRPC

What "Axle sends traces over HTTP, but the OpenTelemetry protocol is grpc" means and how to fix it.

```text
warning: Axle sends traces over HTTP, but the OpenTelemetry protocol is grpc, so it sent none
hint: Point OTEL_EXPORTER_OTLP_ENDPOINT at the collector's HTTP port, usually 4318, and set OTEL_EXPORTER_OTLP_PROTOCOL to http/json.
```

## Why it happens

`OTEL_EXPORTER_OTLP_PROTOCOL` or `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` is set to a protocol other than `http/json` or `http/protobuf`, usually `grpc`. Axle [sends traces](https://axlers.dev/docs/reference/run.md#opentelemetry) as OTLP over HTTP, in JSON, so it sent nothing rather than send to a gRPC port that can't read them. The run itself is unaffected.

## How to fix it

Every OpenTelemetry Collector, and most hosted backends, take OTLP over HTTP as well as gRPC. Point Axle at the HTTP endpoint, which usually listens on port `4318` rather than gRPC's `4317`, and set the protocol for Axle's run:

```sh
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_EXPORTER_OTLP_PROTOCOL=http/json axle run build
```

When other programs in the same job need gRPC, give Axle its own traces endpoint with `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` and `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`, which win over the general ones.
