---
title: "Span metrics | Grafana Tempo documentation"
description: "Learn about span metrics in Grafana Tempo."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Span metrics

Span metrics are generated from traces and can be used to create service graphs. You can create span metrics in Tempo’s metrics-generator, Grafana Alloy, or the OpenTelemetry Collector.

If you sample traces before they reach Tempo, choose where to generate those metrics first. Refer to [Choose where to generate metrics from traces](/docs/tempo/next/metrics-from-traces/where-to-generate-metrics/).

The pages in this section cover Tempo and Alloy settings. For OpenTelemetry Collector settings, including the pipeline diagram, refer to [Generate metrics from spans](/docs/tempo/next/set-up-for-tracing/instrument-send/set-up-collector/otel-collector/#generate-metrics-from-spans).

- [Use the span metrics processor](/docs/tempo/next/metrics-from-traces/span-metrics/span-metrics-metrics-generator/)  
  The span metrics processor generates metrics from ingested tracing data, including request, error, and duration (RED) metrics.
- [Use Alloy to generate span metrics from spans](/docs/tempo/next/metrics-from-traces/span-metrics/span-metrics-alloy/)  
  Span metrics allow you to generate metrics from your tracing data automatically.
