Grafana Cloud

Instrument applications for tracing

To send distributed traces to Grafana Cloud, instrument your applications using OpenTelemetry (OTel) or instrumentation options such as Grafana Beyla. You can also use manual instrumentation to create spans and traces.

For additional information, refer to About instrumentation.

OpenTelemetry SDKs

OpenTelemetry provides language-specific SDKs and auto-instrumentation libraries.

Common patterns:

  • Set a stable service name (resource attribute service.name).
  • Enable context propagation across services (for example, W3C TraceContext).
  • Export via OTLP (HTTP or gRPC) to a local collector such as Grafana Alloy or OpenTelemetry Collector.

Auto-instrumentation

Auto-instrumentation can discover common frameworks/libraries and emit spans without code changes.

Notes:

  • Auto-instrumentation coverage varies by language and framework.
  • You can combine auto-instrumentation with manual spans for critical paths and business events.

Grafana Beyla

Grafana Beyla is an eBPF-based application zero-code instrumentation tool to get started with Application Observability. Beyla uses eBPF to automatically inspect application executables and the OS networking layer, and capture trace spans related to web transactions and Rate Errors Duration (RED) metrics for Linux HTTP/S and gRPC services. All data capture occurs without any modifications to application code or configuration.

Refer to Set up Beyla for information about how to instrument using Beyla.

  • Captures HTTP/gRPC metadata, latency, and error information.
  • Works alongside OpenTelemetry; you can forward traces via OTLP to Alloy or the OTel Collector.

Note

While Beyla is a good choice for metrics, span metrics, and service graphs, if you choose to use it for tracing, check the Distributed traces with Beylato verify that it meets your tracing needs.

Minimal checklist

  1. Choose instrumentation:
    • OTel SDK (manual + auto-instrumentation) or
    • Beyla (auto-instrumentation on Linux)
  2. Set service.name and other resource attributes (for example, environment, version).
  3. Export traces using OTLP to a local collector:
    • Grafana Alloy (preferred) or OpenTelemetry Collector.
  4. In your collector, forward traces to Grafana Cloud Traces.
  5. Verify traces in Grafana (Explore → TraceQL/Search).

Next steps