Files
d1df5c56ca Improve information architecture for Tempo docs (#5463)
* Migrate changes from Tempo PR

Signed-off-by: Jack Baldry <[email protected]>

* Updates to resolve conflicts

* Move getting started files

* Fix aliases

* Merge remote-tracking branch 'origin/master' into jdb/2025-07-tempo-set-up-restructure

Signed-off-by: Jack Baldry <[email protected]>

* Discard changes to content/docs/tempo/next/sync.json

* Add aliases

Signed-off-by: Jack Baldry <[email protected]>

* Fix some aliases

Signed-off-by: Jack Baldry <[email protected]>

* Updates from rebase

* Apply suggestions from code review

Co-authored-by: Jack Baldry <[email protected]>

* Apply suggestions from code review

Co-authored-by: Jack Baldry <[email protected]>

* Update content/docs/tempo/next/set-up-for-tracing/instrument-send/set-up-collector/tail-sampling/policies-strategies.md

Co-authored-by: Jack Baldry <[email protected]>

* Fix links on tile page and test page

* Fix links and update missing content

* Fix links

* Fix links

* Fix links and collector text

* Updates from Alex's feedback

* Link fixes

* Fix links in deploy

* Fix links

* More link fixes

* Fix yet more links

* Fix more links

* Apply suggestions from code review

Co-authored-by: Jack Baldry <[email protected]>

* Update content/docs/tempo/next/set-up-for-tracing/setup-tempo/test/set-up-test-app.md

* Update content/docs/tempo/next/set-up-for-tracing/setup-tempo/test/set-up-test-app.md

* Apply suggestions from code review

* Add deploy preview workflow

Signed-off-by: Jack Baldry <[email protected]>

* Updates for Tiffany's suggested edits

* Update manifest according to PR instructions

---------

Signed-off-by: Jack Baldry <[email protected]>
Co-authored-by: Kim Nylander <[email protected]>
2025-07-31 19:50:31 +05:30

4.8 KiB

aliases, title, menuTitle, description, weight, refs
aliases title menuTitle description weight refs
../../server_side_metrics/service_graphs/
../../metrics-generator/service_graphs/
../../configuration/grafana-alloy/service-graphs/
Enable service graphs Enable service graphs Learn how to enable service graphs using the metrics-generator or Grafana Alloy. 200
cardinality
pattern destination
/docs/tempo/ https://grafana.com/docs/tempo/<TEMPO_VERSION>/metrics-from-traces/metrics-generator/cardinality/
pattern destination
/docs/enterprise-traces/ https://grafana.com/docs/enterprise-traces/<ENTERPRISE_TRACES_VERSION>/metrics-generator/cardinality/

Enable service graphs

You can enable service graphs in Tempo by using the metrics-generator or by configuring service graphs in Grafana Alloy.

Using the metrics-generator to generate service graphs is more efficient and recommended for larger installations.

{{< admonition type="note" >}} Cardinality can pose a problem when you have lots of services. To learn more about cardinality and how to perform a dry run of the metrics-generator, refer to the Cardinality documentation. {{< /admonition >}}

Enable service graphs with metrics-generator

Service graphs are generated in Tempo and pushed to a metrics storage. Then, they can be represented in Grafana as a graph. You need those components to fully use service graphs.

Enable service graphs in Tempo

To enable service graphs in Tempo, enable the metrics-generator and add an overrides section which enables the service-graphs generator. For more information, refer to the configuration details.

To enable service graphs when using Grafana Alloy, refer to the Grafana Alloy and service graphs section.

Enable service graphs in Grafana

{{< admonition type="note" >}} Service graphs are enabled by default in Grafana. Prior to Grafana 9.0.4, service graphs were hidden under the feature toggle tempoServiceGraph. {{< /admonition >}}

Configure a Tempo data source's service graphs by linking to the Prometheus backend where metrics are being sent:

apiVersion: 1
datasources:
  # Prometheus backend where metrics are sent
  - name: Prometheus
    type: prometheus
    uid: prometheus
    url: <prometheus-url>
    jsonData:
      httpMethod: GET
    version: 1
  - name: Tempo
    type: tempo
    uid: tempo
    url: <tempo-url>
    jsonData:
      httpMethod: GET
      serviceMap:
        datasourceUid: 'prometheus'
    version: 1

Enable service graphs using Alloy

A service graph is a visual representation of the interrelationships between various services. Service graphs help to understand the structure of a distributed system, and the connections and dependencies between its components.

The same service graph metrics can also be generated by Tempo. This is more efficient and recommended for larger installations. For a deep look into service graphs, visit this section.

Service graphs are also used in the application performance management dashboard. For more information, refer to the service graph view documentation.

Before you begin

Service graphs are generated in Grafana Alloy and pushed to a Prometheus-compatible backend. Once generated, they can be represented in Grafana as a graph. You need these components to fully use service graphs.

Steps

To start using service graphs, enable the feature in the Alloy configuration.

The following example adds the http.method and http.target span attributes as Prometheus labels to the generated service graph metrics, before writing the metrics to the Grafana OTLP gateway. Received trace spans are immediately written to the OTLP gateway.

otelcol.receiver.otlp "default" {
  grpc {}
  http {}

  output {
    traces = [
      otelcol.connector.servicegraph.default.input,
      otelcol.exporter.otlp.default.input,
    ]
  }
}

otelcol.connector.servicegraph "default" {
  dimensions = ["http.method", "http.target"]
  output {
    metrics = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp "default" {
  client {
    endpoint = env("OTLP_ENDPOINT")
  }
}

To see all the available configuration options, refer to the component reference.