What Grafana version and what operating system are you using?
Grafana Cloud, sending traces using OTLP with Rust.
Using a local tempo docker image with the above code works, the only thing I change is set this env var like so: OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"
What are you trying to achieve?
Send data using OTLP from my application to Grafana cloud.
Error message indicates that exporter tried to make grpc connection. Grafana cloud supports only http,not grpc, so grpc connection can’t be successful.
Are you sure that used OTEL Rust lib has proper support for OTEL_EXPORTER_OTLP_PROTOCOL env variable?
Thanks for this pointer. I will be taking a look into it shortly.
I also tried using the Grafana agent. I am able to send the traces there (using gRPC), and it’s able to write them to my local tempo instance, but I get a 401 when trying to write to my Grafana Cloud instance:
2023-10-03 09:51:31 ts=2023-10-03T07:51:31.73460844Z caller=zapadapter.go:84 level=error component=traces traces_config=default kind=exporter data_type=traces name=otlp/1 msg="Exporting failed. The error is not retryable. Dropping data." error="Permanent error: rpc error: code = Unauthenticated desc = unexpected HTTP status code received from server: 401 (Unauthorized); transport: received unexpected content-type \"application/json\"" dropped_items=10 2023-10-03 09:51:32 ts=2023-10-03T07:51:32.630559006Z caller=zapadapter.go:84 level=error component=traces traces_config=default kind=exporter data_type=traces name=otlp/1 msg="Exporting failed. The error is not retryable. Dropping data." error="Permanent error: rpc error: code = Unauthenticated desc = unexpected HTTP status code received from server: 401 (Unauthorized); transport: received unexpected content-type \"application/json\"" dropped_items=1
This I get with the following configuration, which is described on the docs like so:
BTW I wouldn’t use otlp gateway in prod, because it doesn’t have SLA.
I would export traces directly to Tempo. It will be more reliable from the SLA perspective. It has support for GRPC, so it will be also faster solution.