Directed acyclic graph

Directed acyclic graphs (DAG) present a left-to-right graph of acyclic relationships between nodes so you can visualize relationships and groupings. This visualization works best with acyclic data, which is one-way data with no loops, as in the following examples:

Data TypeAcyclic Example
TracesRequest flows across services
SpansParent → child relationships
Service dependenciesFrontend → backend → DB
AlertsTrigger → notify → escalate
Metrics pipelinesCollect → aggregate → visualize
Logs pipelinesEmit → ingest → store → query
Infrastructure hierarchyCluster → node → pod
Root cause graphsCause → symptom → impact
Event correlationDeployment → spike → incident

Cyclic data can also be represented as a DAG, with its edges plotted as part of the layout of the graph.

Data modeling

In order for your data to be represented in a DAG, it must have a source and destination column, called nodes. The relationships between nodes are called edges. In a DAG, nodes and edges can be labeled, color-coded, and sized by data-driven rules. In this example, we see a data source with a source and destination (target) service:

Your data modeling must observe the following conditions for valid nodes:

  • If source field is null and destination field is non-null → row is ignored/invalid row.
  • If source field is non-null and the destination field is null → row is a node row.
  • If both source and destination fields are non-null → row is an edge row.

Node examples

Every non-null source cell is a node, and every non-null destination cell with a non-null source cell is a node. Some examples:

Source and target descriptionHow the row is treated
NULL -X-> cart_serviceThis is an invalid node row (row is ignored).
cart_server -> NULLThis is a valid node row (creates cart_server node).
api_server -> terraformerThis is a valid node row (creates api_server and terraformer node)
ad_service -> ad_serviceThis is a valid self-referencing node and is a valid node row (creates 1 ad_service node)

Edge examples

Every non-null source or non-null destination row in the table is an edge. Some examples:

Source and target descriptionHow the row is treated
NULL -X-> cart_serviceThis is an invalid edge row (row is ignored).
cart_server -> NULLThis is an invalid edge row, but is a valid node row.
api_server -> terraformerThis is a valid edge row.
ad_service -> ad_serviceThis is a self-referencing node and is a valid edge row.

Assign values to a node

To assign values to a node, the value must appear in a node row where the source is non-null and the destination is null. In the picture above, there are 3 node rows each with 2 values associated to their node:

Nodecount Valueerror_rate value
apiservernull0.002
collectornull0
monitoringnull0

If we were to assign these columns to be displayed in the tooltip, it would look as such:

Assign values to an edge

To assign values to an edge, the values must appear in an edge row where the source is non-null and the destination is non-null. In the picture above, there are 8 edge rows each with 2 values associated to their edge:

Edgecount Valueerror_rate value
apiserverscheduler251648null
apiserverterraformer4274null
apiservermonitoring15null
apiservertransformer1084null
filedropperscheduler3441null
information-schemascheduler10846null
loaderscheduler154801null
monitoringscheduler2817null

View a Directed Acyclic Graph

To view a DAG, access the log or Worksheet and select Directed graph as the chart type. Here is an example from a Worksheet:

In the Settings panel, we can see the source (source_name) and destination (source_namespace) definitions. You can further refine the graph by expanding the Edge and Node panels.

Customize the edges in your DAG

Expand the Edge panel to customize the tooltip content when you hover on an edge, the label for each edge, and the edge colors. In this example, we configure the tooltip to show the duration, response status, and status code, and also change the edge color to purple:

You can click on any edge to pivot and investigate further. The following example shows the pivots available for correlation tags, logs, metrics, and traces. You can also click Inspect pod to go to the Kubernetes Explorer.

Customize the nodes in your DAG

Expand the Node panel to customize the nodes in your DAG, such as color, full, text placement, and tooltip content. In this example, we added the span ID and trace ID to the tooltip when you hover on a node:

Like edges, you can click on any node to pivot to logs, metrics, and traces, or click Inspect service to go to the Service Explorer.