Repository navigation
docs: add a SemanticCache telemetry notebook and starter Grafana dashboard (FDE-89) - #820
Draft
vishal-bala wants to merge 3 commits into
Draft
vishal-bala wants to merge 3 commits into
vishal-bala wants to merge 3 commits into
Conversation
… dashboard The notebook runs an FAQ cache through hits, near misses and misses and reads its traces and metrics back from in-memory readers, so notebook validation exercises real output without any API key. With OTEL_EXPORTER_OTLP_ENDPOINT set, it also exports to a Docker Compose stack (Redis, OpenTelemetry Collector, Prometheus, Jaeger, Grafana) whose dashboard covers hit rate, threshold tuning and latency. The notebook CI job now installs the otel-test group for the SDK. The guide gains a section on the stack and notes on redis-py's command metrics.
…rding Publish every stack port on 127.0.0.1 and give anonymous Grafana users the Editor role, so the unauthenticated services are not reachable from the network. Fix the "hites" panel title, list the OTLP exporter and the redis-py 7.4 floor the notebook's export mode needs, and correct the notebook's lookup groups and kernel-restart hint. The threshold and embedding panels now say they count only misses with a candidate, are per cache, and are not split by cache, respectively.
vishal-bala
force-pushed
the
feat/FDE-83-otel/05-FDE-89-example-dashboard
branch
from
November 7, 2026 13:41
8e768dc to
3d016b0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The PR below adds
SemanticCachetraces, metrics and a reference guide. This PR makes them something a user can try in a few minutes: a notebook that shows what the telemetry says about a real cache, and a local stack with a starter Grafana dashboard for hit rate, threshold tuning and latency. It continues the work for #684.Changes
A notebook that reads the cache's telemetry back
docs/user_guide/15_semantic_cache_observability.ipynbbuilds a five-entry FAQ cache overredis/langcache-embed-v2and sends it 11 lookups: rewordings of stored questions, different questions that sit close to a stored one, and unrelated questions. It then reads back what RedisVL recorded:By default everything stays in memory, so notebook validation exercises real output with no API key. With
OTEL_EXPORTER_OTLP_ENDPOINTset, the notebook also exports over OTLP, turns on redis-py's command metrics, and its last cell (skipped in CI) sends three minutes of lookups.A local stack and starter dashboard
docs/user_guide/how_to_guides/observability-stack/holds a Docker Compose stack: Redis 8.8.0, an OpenTelemetry Collector, Prometheus, Jaeger and Grafana, with every port on127.0.0.1. Grafana opens ongrafana/semantic-cache.json, which has four rows:FT.SEARCHandPIPELINElatency.The dashboard needs only a Prometheus data source, so it can be imported into another Grafana.
Guide and CI
The guide gains an "Explore with a local stack" section, and its redis-py section now names the command metric, says which commands a lookup and a store record, and notes that redis-py uses
db.systemwhere RedisVL usesdb.system.name. The notebook is listed in the how-to index. The notebook CI job gets the SDK from thedevdependency group.Notes
redisvl/utils/otel.py, because the "what if" stats match a bucket'slelabel exactly. The panel descriptions say thresholds are per cache, so the stats are not split by cache.redis/langcache-embed-v2is already used by other notebooks, so CI's model cache holds it, and no API key is needed.Release Notes
SemanticCache's OpenTelemetry traces and metrics in use.Reviewer Brief
Start here:
docs/user_guide/15_semantic_cache_observability.ipynb, the "Configure OpenTelemetry" cell. It decides what runs in CI (in-memory only) and what feeds the stack (OTLP plus redis-py metrics), and every later cell depends on it.Where it could fail
grafana/semantic-cache.json, the two "what if" stats: they matchle="$looser"andle="$tighter"exactly, so a pipeline that formats bucket labels differently from the Collector's Prometheus exporter (for example0.150) returns no data rather than an error.lookup_rows: it pairs each prompt with asemantic_cache.checkspan by start time, so any extra lookup added before the loop would misalign the table.observability-stack/compose.yaml: the five images are pinned to exact tags, and the traces row already depends on a Grafana and Jaeger pairing; a version bump needs the dashboard rechecked.Not verified: the notebook job in CI itself (the same nbval command ran locally); Docker on Linux; importing the dashboard into a Grafana other than 13.2.1, or behind Prometheus's own OTLP receiver, whose metric and label names differ.
Beyond CI: the notebook ran end to end over OTLP against the stack, and every dashboard panel rendered with its data in Grafana 13.2.1, with the Jaeger links opening the lookup traces; nbval passed locally (10 passed, 1 skipped); the docs build adds no warnings, and the notebook's links to guide anchors resolve.
Reviewed
1cdce2e9, fixes ined42e048· Claude Code (claude-opus-5-5) · lenses: correctness, security, design, tests, docs, Redis behaviour