fix(monitoring): monitoring rendering of low traffic app - #2938
fix(monitoring): monitoring rendering of low traffic app#2938lmillie-qovery wants to merge 7 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit 9661035
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2938 +/- ##
===========================================
- Coverage 50.16% 49.08% -1.08%
===========================================
Files 864 1241 +377
Lines 21614 27000 +5386
Branches 6580 8074 +1494
===========================================
+ Hits 10843 13254 +2411
- Misses 8904 11536 +2632
- Partials 1867 2210 +343
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Signed-off-by: Laura Millie <lmillie@qovery.com>
945b817 to
6f2cad4
Compare
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Confidence score: 3/5
network-request-size-chart.tsxhides valid all-zero samples by treating them as missing data, so users see “No traffic in this period” instead of an accurate zero-valued chart; use a data-presence check that accepts finite zero values.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="libs/domains/observability/feature/src/lib/service/service-dashboard/network-request-size-chart/network-request-size-chart.tsx">
<violation number="1" location="libs/domains/observability/feature/src/lib/service/service-dashboard/network-request-size-chart/network-request-size-chart.tsx:246">
P1: When every returned sample is zero, `hasPositiveMetricData` returns false, so the chart is replaced by “No traffic in this period” instead of rendering the real zero line. Use a data-presence check that treats finite zero samples as data.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| isErrorMetricsEnvoyRequestSize, | ||
| httpRouteName, | ||
| ]) | ||
| const hasTraffic = hasPositiveMetricData(chartData) |
There was a problem hiding this comment.
P1: When every returned sample is zero, hasPositiveMetricData returns false, so the chart is replaced by “No traffic in this period” instead of rendering the real zero line. Use a data-presence check that treats finite zero samples as data.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At libs/domains/observability/feature/src/lib/service/service-dashboard/network-request-size-chart/network-request-size-chart.tsx, line 246:
<comment>When every returned sample is zero, `hasPositiveMetricData` returns false, so the chart is replaced by “No traffic in this period” instead of rendering the real zero line. Use a data-presence check that treats finite zero samples as data.</comment>
<file context>
@@ -243,14 +243,15 @@ export function NetworkRequestSizeChart({
])
- const hasError = chartData.length === 0 ? anyError : allError
- const hasPartialError = chartData.length > 0 && anyError && !allError
+ const hasTraffic = hasPositiveMetricData(chartData)
+ const hasError = hasTraffic ? allError : anyError
+ const hasPartialError = hasTraffic && anyError && !allError
</file context>
| const hasTraffic = hasPositiveMetricData(chartData) | |
| const hasTraffic = chartData.length > 0 |
Summary
Fixes the network monitoring charts (status/size/duration, both public envoy/nginx and private beyla
variants) rendering as broken or incomplete during low/zero-traffic periods.
network-request-size-chart.tsx, and their private-* counterparts. The filter was dropping the entire
series at a zero rate instead of letting it render as a real 0, which made an idle service look
identical to a metrics-pipeline outage.
LocalChart, so callers can now distinguish a genuinely failed query (new "Unable to load metrics"
state, driven by React Query's isError) from a successfully-empty one. All 6 network charts now pass
emptyLabel="No traffic in this period" for the latter.
addTimeRangePadding in all 6 network charts, so gaps between data points fill with 0 instead of
null. Previously a gap rendered as a visual break regardless of cause, while a timestamp where
Thanos happened to return a sample rendered as a point — producing an inconsistent, flickering line
even during genuinely idle stretches.
Test plan
tests respectively), including new get-series-keys.spec.ts
continuous line, flat at 0 during idle, real values during traffic; a simulated query failure shows
the new "Unable to load metrics" state)
Screenshot:


Before:
After:
Summary by cubic
Fixes the network monitoring charts (status/size/duration, public envoy/nginx and private beyla variants) rendering as broken or incomplete during low- or zero-traffic periods. Idle services now show a "No traffic in this period" state instead of a flat 0 line that looked like a metrics-pipeline outage.
> 0PromQL filter so zero-rate samples survive and render as idle rather than missing.< 0.01 req/sfor low non-zero rates.Written for commit 002b5e3. Summary will update on new commits.