-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[USMON-1439] - Add error types to USM Redis stats #36857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Uncompressed package size comparisonComparison with ancestor Diff per package
Decision |
98986f8
to
e47d731
Compare
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 7f0b911 Optimization Goals: ❌ Regression(s) detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
❌ | docker_containers_cpu | % cpu utilization | +5.38 | [+2.26, +8.50] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | +0.69 | [+0.63, +0.75] | 1 | Logs bounds checks dashboard |
➖ | file_tree | memory utilization | +0.69 | [+0.52, +0.86] | 1 | Logs |
➖ | ddot_logs | memory utilization | +0.45 | [+0.30, +0.59] | 1 | Logs |
➖ | docker_containers_memory | memory utilization | +0.39 | [+0.32, +0.46] | 1 | Logs |
➖ | otlp_ingest_metrics | memory utilization | +0.32 | [+0.16, +0.49] | 1 | Logs |
➖ | otlp_ingest_logs | memory utilization | +0.25 | [+0.12, +0.38] | 1 | Logs |
➖ | ddot_metrics | memory utilization | +0.10 | [-0.02, +0.21] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.09 | [-0.47, +0.66] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | +0.09 | [-0.00, +0.18] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.08 | [-0.47, +0.63] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.04 | [-0.58, +0.66] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.27, +0.27] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.02, +0.01] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | -0.01 | [-0.25, +0.23] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | -0.02 | [-0.63, +0.58] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | -0.03 | [-0.64, +0.59] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency_http2 | egress throughput | -0.03 | [-0.57, +0.51] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency_http1 | egress throughput | -0.08 | [-0.64, +0.49] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.18 | [-0.24, -0.13] | 1 | Logs |
➖ | uds_dogstatsd_20mb_12k_contexts_20_senders | memory utilization | -0.20 | [-0.25, -0.15] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -1.76 | [-2.60, -0.92] | 1 | Logs |
➖ | quality_gate_logs | % cpu utilization | -2.78 | [-5.50, -0.05] | 1 | Logs bounds checks dashboard |
Bounds Checks: ✅ Passed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
✅ | docker_containers_cpu | simple_check_run | 10/10 | |
✅ | docker_containers_memory | memory_usage | 10/10 | |
✅ | docker_containers_memory | simple_check_run | 10/10 | |
✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http1 | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http1 | memory_usage | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http2 | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http2 | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency_linear_load | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
✅ | quality_gate_idle | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | lost_bytes | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | memory_usage | 10/10 | bounds checks dashboard |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
|
if (bpf_memcmp(prefix, "ERR", 3) == 0) return REDIS_ERR_ERR; | ||
if (bpf_memcmp(prefix, "WRONGTYPE", 9) == 0) return REDIS_ERR_WRONGTYPE; | ||
if (bpf_memcmp(prefix, "NOAUTH", 6) == 0) return REDIS_ERR_NOAUTH; | ||
if (bpf_memcmp(prefix, "NOPERM", 6) == 0) return REDIS_ERR_NOPERM; | ||
if (bpf_memcmp(prefix, "BUSY", 4) == 0) return REDIS_ERR_BUSY; | ||
if (bpf_memcmp(prefix, "NOSCRIPT", 8) == 0) return REDIS_ERR_NOSCRIPT; | ||
if (bpf_memcmp(prefix, "LOADING", 7) == 0) return REDIS_ERR_LOADING; | ||
if (bpf_memcmp(prefix, "READONLY", 8) == 0) return REDIS_ERR_READONLY; | ||
if (bpf_memcmp(prefix, "EXECABORT", 9) == 0) return REDIS_ERR_EXECABORT; | ||
if (bpf_memcmp(prefix, "MASTERDOWN", 10) == 0) return REDIS_ERR_MASTERDOWN; | ||
if (bpf_memcmp(prefix, "MISCONF", 7) == 0) return REDIS_ERR_MISCONF; | ||
if (bpf_memcmp(prefix, "CROSSSLOT", 9) == 0) return REDIS_ERR_CROSSSLOT; | ||
if (bpf_memcmp(prefix, "TRYAGAIN", 8) == 0) return REDIS_ERR_TRYAGAIN; | ||
if (bpf_memcmp(prefix, "ASK", 3) == 0) return REDIS_ERR_ASK; | ||
if (bpf_memcmp(prefix, "MOVED", 5) == 0) return REDIS_ERR_MOVED; | ||
if (bpf_memcmp(prefix, "CLUSTERDOWN", 11) == 0) return REDIS_ERR_CLUSTERDOWN; | ||
if (bpf_memcmp(prefix, "NOREPLICAS", 10) == 0) return REDIS_ERR_NOREPLICAS; | ||
if (bpf_memcmp(prefix, "OOM", 3) == 0) return REDIS_ERR_OOM; | ||
if (bpf_memcmp(prefix, "NOQUORUM", 8) == 0) return REDIS_ERR_NOQUORUM; | ||
if (bpf_memcmp(prefix, "BUSYKEY", 7) == 0) return REDIS_ERR_BUSYKEY; | ||
if (bpf_memcmp(prefix, "UNBLOCKED", 9) == 0) return REDIS_ERR_UNBLOCKED; | ||
if (bpf_memcmp(prefix, "WRONGPASS", 9) == 0) return REDIS_ERR_WRONGPASS; | ||
if (bpf_memcmp(prefix, "INVALIDOBJ", 7) == 0) return REDIS_ERR_INVALIDOBJ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do recommend on usind #define
on the strings, and use sizeof
instead of hardcoded sizes
Also, it might be benefitcal to store the PREFIXES and their values in a hash map
and just check if the key exists in the map
bool got_error = extract_redis_error_prefix(pkt, error_prefix, sizeof(error_prefix)); | ||
if (got_error) { | ||
transaction->error = map_redis_error_prefix(error_prefix); | ||
} else { | ||
transaction->error = REDIS_ERR_UNKNOWN; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With my previous comment, I think the condition is redundant, as eventually transaction->error = map_redis_error_prefix
should suffice, as the default behavior is REDIS_ERR_UNKNOWN
@@ -13,6 +13,7 @@ | |||
#define METHOD_LEN 3 // We only support GET and SET for now, both with length 3. | |||
#define MAX_DIGITS_KEY_LEN_PREFIX 3 // Since we clamp key length to 128, when reading key length prefix, we only need to read up to 3 digits. | |||
#define MAX_KEY_LEN 128 | |||
#define MAX_ERROR_SIZE 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 20?
REDIS_ERR_UNKNOWN = 1, | ||
REDIS_ERR_ERR = 2, | ||
REDIS_ERR_WRONGTYPE = 3, | ||
REDIS_ERR_NOAUTH = 4, | ||
REDIS_ERR_NOPERM = 5, | ||
REDIS_ERR_BUSY = 6, | ||
REDIS_ERR_NOSCRIPT = 7, | ||
REDIS_ERR_LOADING = 8, | ||
REDIS_ERR_READONLY = 9, | ||
REDIS_ERR_EXECABORT = 10, | ||
REDIS_ERR_MASTERDOWN = 11, | ||
REDIS_ERR_MISCONF = 12, | ||
REDIS_ERR_CROSSSLOT = 13, | ||
REDIS_ERR_TRYAGAIN = 14, | ||
REDIS_ERR_ASK = 15, | ||
REDIS_ERR_MOVED = 16, | ||
REDIS_ERR_CLUSTERDOWN = 17, | ||
REDIS_ERR_NOREPLICAS = 18, | ||
REDIS_ERR_OOM = 19, | ||
REDIS_ERR_NOQUORUM = 20, | ||
REDIS_ERR_BUSYKEY = 21, | ||
REDIS_ERR_UNBLOCKED = 22, | ||
REDIS_ERR_WRONGPASS = 23, | ||
REDIS_ERR_INVALIDOBJ = 24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numbers are redundant after you've initialized the first element (if it is 0 you don't need to declare)
redis_command_t command; // 1 byte | ||
__u8 tags; // 1 byte | ||
bool truncated; // 1 byte | ||
bool is_error; // 1 byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need is_error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed
As we now report the actual error, we don't need the binary flag to indicate if we have an error
What does this PR do?
Adds reporting of error prefix for USM Redis stats.
Motivation
Let customers know what type of errors they receive, other than indicating whether an error occurred or not.
Describe how you validated your changes
Updated tests to use error types.
Tested in staging.
Possible Drawbacks / Trade-offs
Additional Notes