Skip to content

Graph view for service_graph connector metrics (node/edge service map in dashboards) #3857

Backlog

Description

@bahltushar

Problem

The Service map (beta) builds its nodes and edges from spans in a Traces source. Some teams can't or don't store every span, so they use the OpenTelemetry servicegraph connector to produce parent → child metrics instead:

  • traces_service_graph_request_total
  • traces_service_graph_request_failed_total
  • traces_service_graph_request_server_seconds / _client_seconds (histograms)

These are queried through a Prometheus-compatible endpoint with PromQL. Dashboard tiles can show them as time series and tables, but there is no way to draw them as a node-and-edge graph like the Service map. Teams that want a service-map view from metrics have to run a separate tool.

Use case

  • See which services call which, with req/s, error rate and p95 per edge, for a chosen service and its upstream and downstream neighbours.
  • Use the same interaction as the Service map: pick a service, set depth, colour nodes by error rate, latency or throughput.
  • Keep the view inside ClickStack, next to the dashboards it complements.

Proposal

Any of these would meet the need. We would appreciate maintainer input on which fits the roadmap:

  1. A graph panel type for dashboards that takes node and edge data from a PromQL or SQL query.
  2. A data-source option for the Service map page so it can read from service_graph metrics instead of spans.
  3. Documentation of a recommended way to render service-graph metrics, if a built-in view is out of scope.

Known limitations we have seen

  • The connector pairs client and server spans only when both reach the same collector instance within its store TTL. With several replicas, some edges are missed or appear as server="unknown". A view built on these metrics inherits that gap, so the docs should say so.
  • Histogram-based p95 is an estimate, especially for short windows.
  • The Service map and the metrics view can disagree because of sampling and pairing differences.

Environment

  • ClickStack / HyperDX version: 2.47.0
  • Metrics store: Prometheus-compatible (PromQL)
  • Collector: OpenTelemetry Collector with the servicegraph connector

Questions

  • Is a graph view over service_graph metrics in scope for ClickStack?
  • If so, should it be a dashboard panel or a data source for the existing Service map?
  • Is there a preferred way to handle missing edges from pairing gaps?

Service-map-style graph based on ServiceGraph metrics (please note this is on the basis of demo data)

image

Activity

  1. added
    enhancement
    Needs Feedback
    on Nov 30, 2026
  2. volodymyrshk commented on Nov 30, 2026

    @volodymyrshk

    Can I take this one? I’d start with a small service map that builds nodes and edges from OpenTelemetry servicegraph request and error counters. Would a dashboard tile be the right place for the first version?

  3. bahltushar commented on Dec 1, 2026

    @bahltushar
    ContributorAuthor

    @volodymyrshk thanks for jumping in. We've been working on the same idea, so it may be worth coordinating so we don't duplicate effort.

    To your question about a dashboard tile: for a first version, yes. The service_graph connector metrics (traces_service_graph_request_total, the failed counter, and the latency histogram) can drive edge-level tiles in PromQL mode today, with no new code. We have three working: request rate, failure ratio and p95 latency, each grouped by client and server. For example:

    sum by (client, server) (rate(traces_service_graph_request_total[5m]))

    What a tile can't do is draw the node and edge graph itself. There's no graph chart type, so a real map needs a new chart type in the UI. We've prototyped that outside ClickStack as a small standalone viewer (node size = throughput, colour = error rate or latency, focused on one service with parents and children).

    Things we ran into that would apply to any implementation built from these metrics:

    Replicas need distinct series. The connector emits cumulative counters with no instance identity. With several collector replicas they write the same series, and rate()/increase() over-count badly. Adding a per-instance label fixes this.
    Virtual nodes add noise. Peers like user, unknown and database targets are created for client spans with no matching server span. They're worth hiding by default or showing as a separate node type.
    Pairing is lossy across instances. Client and server spans are only paired if they reach the same instance within store.ttl, so sparse edges are undercounted unless routing is trace-ID aware.
    A focused view reads better. Showing only the selected service's own upstream and downstream paths, laid out left to right, is much easier to read than drawing every edge between the visible nodes.
    Compare against the existing trace-based Service map at the same settings. It samples 1% of spans by default, which hides most low-traffic edges.

    image

    Happy to share what we have or help review. Which would be most useful: a prototype of the graph view, or the edge-level tiles first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Feedbackenhancementexternal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions