Grafana AgentService graphs

Service graphs

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 APM dashboard documentation.

Quickstart

Service graphs are generated in the Grafana Agent and pushed to a prometheus compatible backend. Then, they can be represented in Grafana as a graph. You will need those components to fully use service graphs.

Grafana Agent

To start using service graphs, enable the feature in the Grafana Agent config.

traces:
  configs:
    - name: default
      ...
      service_graphs:
        enabled: true

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

Metrics are registered in the Agent’s default registerer. Therefore, they are exposed at /metrics in the Agent’s server port (default 12345). One option is to use the Agent self-scrape capabilities to export the metrics to a prometheus compatible backend.

metrics:
  configs:
    - name: default
      scrape_configs:
        - job_name: local_scrape
          static_configs:
            - targets: ['127.0.0.1:12345']
      remote_write:
        - url: <remote_write>

Grafana

The same service graph metrics can also be generated by Tempo. This is more efficient and recommended for larger installations. For additional information about viewing service graph metrics in Grafana and calculating cardinality check out the server side documentation.