Skip to content
LinkState
Go back

Rendered subscriptions versus actual observed coverage

Comparing Generated Subscription Paths with Collector Leaves: Exposing Silent Schema Gaps

Introduction to Observability Completeness

Observability completeness is the degree to which the set of telemetry signals collected from a system matches the set of signals required to answer all operational questions of interest without relying on inference, correlation, or external knowledge that is not directly observable. Let:

Understanding Subscription Paths and Collector Leaves

Overview of Subscription Paths

A subscription path is a YANG-modeled XPath that identifies a subtree of data to be streamed. The automation may also apply path normalization: collapsing duplicate leaf-lists, adding key predicates, or inserting namespace prefixes.

Collector Leaves and Their Role in Observability

A collector leaf is the atomic telemetry datum that arrives at the observability backend after transport, decoding, and optional transformation. The collector’s leaf set (S_observed) is a function of the submitted paths, transport fidelity, collector parsing rules, and post-processing.

Silent Schema Gaps and Their Impact

Definition and Explanation of Silent Schema Gaps

A silent schema gap occurs when the automation believes a subscription path P is active and valid, the telemetry agent successfully renders P, but the collector receives a stream for P without the corresponding leaf(s) in S_observed due to a YANG schema mismatch. Typical causes include:

CauseDescriptionExample
Schema version mismatchAgent uses a different YANG revision than the collector./interfaces/interface/state/oper-status vs /interfaces/interface/state/admin-status.
Namespace omissionAgent strips the namespace prefix; collector expects it.interfaces/interface[name=eth0]/counters vs ietf-interfaces:interfaces/interface[name=eth0]/counters.

Troubleshooting Silent Schema Gaps

Identifying Silent Schema Gaps

A systematic approach:

  1. Collect the four sets (intended, rendered, applied, observed).
  2. Normalize each path to a canonical form.
  3. Compute set differences.
  4. Validate schema compatibility for each element in Missing.

Tools and Techniques for Detecting Schema Gaps

ToolPrimary UseHow it Helps Detect Gaps
gnmi_cli (with -debug)Agent-side subscription renderingPrints the exact paths the agent attempts to stream.
ytunnel or gnmi-proxyTransparent gNMI tapCaptures raw gNMI messages.

Code Examples for Troubleshooting Silent Schema Gaps

CLI Commands for Schema Gap Detection

# 1. Export intended paths from Git
git show HEAD:config/intent/subscriptions.yaml > intended_paths.txt
# 2. Render paths on the telemetry agent
gnmi_cli -addr telemetry-agent:9339 -debug -subscribe -paths intended_paths.txt > rendered_paths.txt 2>&1
# 3. Capture raw gNMI messages on the wire
tcpdump -i any port 9339 -w gnmi.pcap -c 1000
# 4. Extract observed metric names from Prometheus
curl -s http://prometheus:9090/api/v1/label/__name__/values | jq -r '.data[]' > observed_metrics.txt

Programming Language Examples for Schema Gap Identification

Python (set-based diff + YANG validation)

import subprocess, json, sys
from lxml import etree

def run(cmd):
    return subprocess.check_output(cmd, shell=True, text=True).strip()

# 1. Load intended paths
intended = set(run("cat intended_paths.txt").splitlines())
# 2. Load observed metric names from Prometheus
observed = set(run("curl -s http://prometheus:9090/api/v1/label/__name__/values | jq -r '.data[]'").splitlines())

Share this post on:

Previous Post
Rollback plans need their own gates
Next Post
Nested labs and the virtio single-queue cliff