Migrate from Grafana Cloud to Logfire
Grafana Cloud’s recommended pipeline is Grafana Alloy, Grafana’s distribution of the OpenTelemetry Collector, exporting OTLP to the Grafana Cloud endpoint (Tempo for traces, Loki for logs, Mimir for metrics). Because that’s standard OpenTelemetry, migrating to Logfire is an exporter change — see Migrate to Logfire for the general shape.
You’ll need a Logfire write token and your region endpoint (https://logfire-us.pydantic.dev or -eu).
Grafana Cloud authenticates OTLP with HTTP Basic auth (instanceID:token). Point the SDK at Logfire and replace that with Logfire’s Authorization header:
# before (Grafana Cloud — copy your exact values from the Grafana Cloud
# "OpenTelemetry" tile, which generates the endpoint and Basic-auth header):
# OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-gateway-<region>.grafana.net/otlp
# OTEL_EXPORTER_OTLP_HEADERS='Authorization=Basic <base64 instanceID:token>'
export OTEL_EXPORTER_OTLP_ENDPOINT=https://logfire-us.pydantic.dev
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS='Authorization=your-write-token'
export OTEL_SERVICE_NAME=your-service-name
Change the otelcol.exporter.otlphttp block’s endpoint and auth to Logfire, and keep the rest of your pipeline. Alloy uses its own configuration syntax:
otelcol.exporter.otlphttp "logfire" {
client {
endpoint = "https://logfire-us.pydantic.dev" // or https://logfire-eu.pydantic.dev
headers = {
"Authorization" = "Bearer " + sys.env("LOGFIRE_TOKEN"),
}
}
}
Then point your processors’ output at otelcol.exporter.otlphttp.logfire.input. During a cutover you can send to both Grafana Cloud and Logfire from the same pipeline.
Run your workload and open the Live view. Traces should appear within seconds.
- Migrate to Logfire — the general two-path pattern and parallel-run guidance
- Logfire vs Grafana — how the platforms compare
- Grafana’s own docs, to confirm your current endpoint and header: Send data to the Grafana Cloud OTLP endpoint and the
otelcol.exporter.otlphttpAlloy component