Add redisdb full-coverage evalya fixture - #24917
Draft
NouemanKHAL wants to merge 2 commits into
Draft
Conversation
Add a full metric-coverage evalya environment for the redisdb check and the OpenTelemetry redisreceiver. A master/replica pair plus a one-shot seed produce every naturally derived INFO field (keyspace, eviction, expiry, commandstats, replication, net). An INFO-rewrite proxy fronts the master and augments INFO all with the fields OSS Redis never emits (managed-service, cluster, sentinel, RediSearch) and serves a canned CLUSTER INFO. Both scrapers read INFO as flat key:value, so one injection point feeds both sides of the metrics-equivalence pipeline. Published as the redis-full task so a single dependency on the proxy pulls up the whole environment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the redisdb test INFO-rewrite proxy's Go directive and build image from 1.23 to 1.26. Test-fixture only; not shipped with the Agent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
evalya-impact-summaryevalya impact analysis |
Contributor
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 9a67505 | Docs | View more details | Give us feedback! |
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.
What does this PR do?
Adds a full metric-coverage evalya test fixture for the
redisdbintegration (redis-full), alongside the existing authenticated standalone fixture (redis-standalone), and bumps the supporting Go proxy toolchain from 1.23 to 1.26.How
redis-fullworksredis-fullpublishes a Compose environment (redisdb/tests/compose/full-coverage.compose) whose entrypoint is a small Go RESP proxy. The goal is to make a single fixture emit the entire INFO surface that theredisdbcheck and the OpenTelemetryredisreceivercan parse, including fields a plain OSS Redis can never produce.The environment has four services:
redis-serverrun with AOF on, a 16MBmaxmemoryceiling underallkeys-lru,slowlog-log-slower-than 0, and latency monitoring. No config file is mounted on purpose, soCONFIG/CLIENT/CLUSTERstay un-renamed and the check's side-channel collections work.replicaof redis-master, soINFO replicationreports a connected slave (connected_slaves,slave0) and the check's with-replica code path is exercised.redis-benchmarkoverfill that forces evictions, a slow command, and short-TTL keys read back after expiry. This drives the naturally derived counters (keyspace hits/misses, evicted/expired keys, commands processed, net bytes, commandstats, slowlog) to non-zero before the first scrape.redisdb/tests/proxy/) that fronts the master on 6379. It is the fixture entrypoint (published asredis-full), gated on master + replica healthy and seed completed, so a single dependency on the proxy pulls up the whole environment already primed.The proxy forwards every command to the master byte-for-byte, with exactly two exceptions:
INFO allrewrite. It appends the key:value lines inredisdb/tests/proxy/inject.confto the INFO reply. These are precisely the fields OSS Redis cannot emit no matter how it is configured — Azure managed-cache fields (bytes_received_per_sec),cluster_enabled/cluster_connections, thesentinel_*family, and the RediSearchsearch_*family — each matching a key the check expects inconstants.py. Section-scoped requests (INFO commandstats,INFO keyspace) are left untouched so their narrowly parsed replies are not polluted.CLUSTER INFO. Served fromcluster_info.txtwithout touching the backend, so a standalone instance presents as cluster-enabled and the check follows its cluster path.A single injection point covers both scrapers because both read INFO as flat key:value pairs. The proxy dials a dedicated backend connection per client to preserve per-connection AUTH and RESP protocol state, and its RESP framing handles both RESP2 (the
redisdbcheck pins protocol 2) and RESP3 (the OTel receiver's go-redis client negotiates it via HELLO).Only the Redis metric-generation setup lives here; the DD Agent / OTel Collector stack that consumes these fixtures lives in semantic-core.
Motivation
Give the
redisdbcheck a fixture that exercises its full metric surface end-to-end, including the managed-service, cluster, sentinel, and RediSearch fields a plain OSS Redis instance never reports, so metric parsing and submission can be validated without standing up Azure Cache, a sentinel deployment, or a RediSearch module build.Review checklist (to be filled by the reviewer)
qa/skip-qa(test fixtures and developer tooling only; no Agent-impacting change).