Skip to main content

RELATIONSHIPS_SCHEMA

Static RELATIONSHIPS_SCHEMA 

Source
static RELATIONSHIPS_SCHEMA: LazyLock<SchemaRef>
Expand description

Schema of semantic_relationships — the edge set of the graph, one row per edge observed in a time window. This is the 18-column contract every derived branch and the declared-edge table must project for the top-level UNION ALL.

Columns:

  • observed_at — TIME INDEX; the 60s time bucket the edge was observed in.
  • window_start / window_end — the observation window (window_start + 60s).
  • fresh_until — time up to which the edge is considered live; equals window_end for derived edges (from valid_until for declared edges).
  • src_type / src_id — type and canonical id of the source endpoint.
  • dst_type / dst_id — type and canonical id of the destination endpoint.
  • rel_type — relationship kind, e.g. calls, runs_on, contains, part_of, depends_on (direction is src → dst; the inverse is a query concern).
  • provenance — how the edge was obtained: trace (derived from spans), attribute (shared-identity join), declared (hand-inserted), or agent (agent-inferred). Part of the edge identity, so edges of different provenance for the same pair coexist.
  • confidence — derivation certainty in [0, 1]: 1.0 for paired or declared edges, lower for virtual-node or agent-inferred edges. It does not correct for trace sampling.
  • request_count — RED: number of requests over the window (calls edges).
  • unmatched_count — client spans on this edge with no server span. The other RED columns describe the pairs alone, so this is what separates a callee that stopped responding from traffic that stopped arriving.
  • error_count — RED: number of errored requests over the window.
  • duration_sum — RED: sum of request durations, in seconds, over the window.
  • duration_count— RED: number of durations summed (pair with duration_sum to get an average).
  • duration_max — RED: longest single request, in seconds, over the same population duration_sum covers.
  • attributes — JSON of edge attributes, e.g. connection_type, db.system, peer.service.