Lineage Read Metrics
The DD Lineage metric group records how lineage is read, as well as how it is built. Each time someone opens a lineage graph, a table's columns or a search, DataDios records one read. Once an hour it adds the reads up into rows of the dd_lineage_view view. A Tenant Admin can build alert rules and dashboard widgets on that view, through the datadios_self data source (see The DataDios Data Source).
Read rows have event_type set to lineage_read. Rows for other event types (builds, graph size and so on) leave the read columns empty.
What a row is
One row is one hour of one tenant, for one combination of these keys: graph_id, route, mode, direction, outcome, and the entity that was read (entity_id, entity_type, entity_name). The existing Events column is the number of reads in the row, and Max Duration (ms) and Total Duration (ms) are the slowest and the summed read time.
The read metrics
| Display name | View column | What it means | Unit | Per hour |
|---|---|---|---|---|
| Nodes Returned | nodes_returned | Objects in the answers: entities, data sources, children, columns, search results and so on. The start object counts when the answer returns it separately. | Count of objects | Summed |
| Edges Returned | edges_returned | Relationships in the answers: edges, declared relationships and column suggestions. | Count of relationships | Summed |
| Pages Cut | pages_cut | Reads whose answer said it was cut short (truncated). Each such read adds 1. | Count of reads | Summed |
| Depth | depth | How many steps the read walked from the start object, from 1 to 5. The depth actually walked when the answer reports it, otherwise the depth asked for (the default is 2). /neighbors is always 1. Routes with no depth leave it empty. | Steps | Highest in the hour |
A value that no read in the hour measured stays empty. It is never 0. A read that failed before it returned anything has no counts, and its Pages Cut is empty.
The read keys
| Display name | View column | What it holds |
|---|---|---|
| Route | route | The URL pattern that was read, for example /data-lineage/entities/<entity_id>/graph. |
| Mode | mode | table or column. Only routes that take a mode fill it (the default is table). |
| Direction | direction | upstream, downstream or both. Only routes that take a direction fill it (the default is both). |
The other keys on a read row are graph_id (the graph that was read, empty when the read was refused for the graph, or for the live graph), outcome, and the start object: entity_id, entity_type and entity_name. DataDios cuts any key value longer than 128 bytes.
The outcome values
| Value | Meaning |
|---|---|
ok | The read answered with a status below 400. |
A status code, such as 403, 404 or 503 | The read answered with that status of 400 or above. |
invalid | The value was not one DataDios accepts. For outcome, it was neither ok nor a status code from 100 to 599. |
invalid is also written to Mode when the request asked for a mode other than table or column, and to Direction when it asked for one other than upstream, downstream or both. It keeps a mistyped or hostile query value from creating a new row for every spelling.
Only the top 1,000 entities per hour
For each tenant and hour, DataDios keeps the 1,000 most-read (graph, entity) pairs as their own rows. Ties go to the pair with the lower hash. The rest are rolled up:
- Reads of less-read pairs go into rows with no entity:
entity_id,entity_typeandentity_nameare empty. They share these rows with reads that never had a start object (for example a graph-wide read). - The totals stay exact. Events, durations, nodes, edges, Pages Cut,
graph_id,route,mode,directionandoutcomeare not changed by the roll-up. Only the entity is lost. - Reads with no entity never use up one of the 1,000 places.
So an hour has at most 1,000 entities times the route, mode, direction and outcome combinations that were seen. To count reads for a route, add up the rows, including those with no entity. A chart or alert that filters on an entity sees only the top 1,000 for that hour.
The truncated flag
These lineage API answers carry a top-level truncated flag, true when DataDios cut the answer.
| Route | truncated is true when |
|---|---|
GET /data-lineage/graph/entities and GET /data-lineage/graph/edges | The graph has more than 50,000 entities (or edges) and the answer was cut to 50,000. total is the number returned, not the size of the graph. |
GET /data-lineage/live/graph | The object has more than 5,000 related objects and the answer was cut to 5,000. |
The flag is always present on these answers, false when nothing was cut. The graph walk reports its own cut as page_info.truncated, and /neighbors as truncated; see Lineage.
How Pages Cut counts
Pages Cut adds 1 for a read whose answer says it was cut: truncated on the answers above and on /neighbors, or page_info.truncated on a graph walk. A page that simply has a next page (has_more) does not count, so ordinary paging through children or columns leaves Pages Cut at 0.
Which reads are counted
Counted: every read-only lineage request that gets as far as the lineage code, whatever it answered. That covers the entity, children, columns, search, graph, neighbors, rollup, data-source subgraph, full-graph, transforms and column-suggestion reads, the live graph, and the list of declared relationships. A read refused for its graph is counted with an outcome of 403 and no graph_id. A read while lineage is switched off is counted with 503.
Not counted:
- Requests refused before the lineage code runs: a missing or invalid login, and the permission check on the live graph's data source. They have no row.
- The graph list, graph sync and mapping-candidate reads.
- Anything that writes: creating or deleting a declared relationship.