The documentation pages should be up to date, but note that how things are configured might differ depending on what you are using. I’ll change the doc to make this clear.
When using the collector, you don’t need the final part of the URL, which is signal-specific. There, “https://otlp-gateway-prod-us-central-0.grafana.net/otlp” will work. In other places, when dealing with signal-specific configuration, you’ll need a suffix like “/v1/metrics” or “/v1/traces”.
From your message, it’s not clear to me what you are trying to configure, but I just tried the following Collector configuration against an account of mine and confirmed that it works:
extensions: [ basicauth ]
receivers: [ otlp ]
processors: [ ]
exporters: [ otlphttp ]
GRAFANA_CLOUD_USER is the “Instance ID” that can be found under your “Grafana” settings for the stack, and
GRAFANA_CLOUD_TOKEN is an API key with
telemetrygen (https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/telemetrygen) to send some traces to my collector:
telemetrygen traces --traces 100 --otlp-insecure
And the collector metrics confirmed that data was successfully sent:
$ curl -s localhost:8888/metrics | grep otelcol_exporter_sent_spans
# HELP otelcol_exporter_sent_spans Number of spans successfully sent to destination.
# TYPE otelcol_exporter_sent_spans counter
And finally, I see traces on my Grafana Cloud account: