Getting 401 (Unauthorized); transport: received unexpected content-type application/json when shipping traces using Grafana Agent


I was following this guide below to ship traces from k8s to grafana cloud:

But I keep on getting this error from grafana-agent-traces pod:

│ ts=2023-02-11T13:10:28Z level=error caller=exporterhelper/queued_retry.go:149 msg="Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors" │
│  component=traces traces_config=default kind=exporter data_type=traces name=otlp/0 error="Permanent error: rpc error: code = Unauthenticated desc = unexpected HTTP status cod │
│ e received from server: 401 (Unauthorized); transport: received unexpected content-type \"application/json\""


I’m also facing same issue. @lordpangan did you find any solution?

Hi! Can you check that you’ve correctly configured basic auth?