Instrument any app with OpenTelemetry and ship metrics / logs / traces to Grafana Cloud or self-hosted Mimir / Loki / Tempo / Pyroscope. Covers SDK auto-instrumentation for Go, Java (Grafana JVM agent), Python (`opentelemetry-instrument`), Node.js, .NET (`Grafana.OpenTelemetry`), Beyla eBPF for zero-code; Grafana Cloud OTLP gateway + Basic-auth (instanceID + API key, base64); env-var config (`OTEL_EXPORTER_OTLP_*`, `OTEL_RESOURCE_ATTRIBUTES`); Alloy / OTel-Collector pipelines; Kubernetes Operato
Detected risks:
OpenTelemetry with Grafana covers instrumenting an application with OpenTelemetry and shipping its metrics, logs, traces, and profiles to Grafana Cloud or a self-hosted stack. The pipeline is vendor-neutral: applications speak OTLP either directly to the Grafana Cloud OTLP gateway or through Alloy or an OpenTelemetry Collector, and the signals land in Grafana Mimir for metrics, Loki for logs, Tempo for traces, and Pyroscope for profiles. It applies whether the goal is standing up new instrumentation, repointing OTLP at Grafana, migrating off Jaeger, Datadog, or New Relic, or debugging why spans are not appearing in Explore.
Auto-instrumentation is documented per language, including Go, Java via the Grafana JVM agent, Python via opentelemetry-instrument, Node.js, and .NET, plus Beyla eBPF for zero-code instrumentation. Authentication to the Cloud gateway uses HTTP Basic auth built from a numeric instance ID and an API token holding the MetricsPublisher, LogsPublisher, and TracesPublisher roles, base64-encoded into an Authorization header. Configuration is driven by standard environment variables such as OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_HEADERS, and OTEL_RESOURCE_ATTRIBUTES, and the workflows include curl smoke-tests and Grafana Explore queries in TraceQL and PromQL to confirm data is flowing.
Beyond direct export, it shows adding Alloy as a buffering and sampling collector, installing instrumentation on Kubernetes through the OpenTelemetry Operator with inject annotations, and choosing between head sampling (cheap, decided at the start of a trace) and tail sampling (decided after the whole trace, keeping errors), which requires an Alloy or Collector tail_sampling processor. A troubleshooting section maps common failures to causes, such as a 401 meaning a non-numeric instance ID or missing publisher roles, a 404 meaning the endpoint does not end in /otlp, and protocol mismatches or bundler and post-fork issues causing missing spans.
Go, Java through the Grafana JVM agent, Python via opentelemetry-instrument, Node.js, and .NET, plus Beyla eBPF for zero-code instrumentation.
Metrics go to Grafana Mimir, logs to Loki, traces to Tempo, and profiles to Pyroscope.
With HTTP Basic auth built from a numeric instance ID and an API token holding the publisher roles, base64-encoded into an Authorization header.
Head sampling is cheap and decided at the start of a trace, while tail sampling decides after seeing the whole trace so errors can be kept, and it requires an Alloy or Collector tail_sampling processor.
Either the instance ID is not numeric or the API key is missing the required publisher roles.
Quick Setup:
.claude/skills/Repository
grafana/skills