Skip to content

feat(observability): add node infrastructure section with lazy loading and node events#2462

Open
Guimove wants to merge 5 commits intostagingfrom
feat/observability-karpenter-node-events
Open

feat(observability): add node infrastructure section with lazy loading and node events#2462
Guimove wants to merge 5 commits intostagingfrom
feat/observability-karpenter-node-events

Conversation

@Guimove
Copy link
Contributor

@Guimove Guimove commented Mar 10, 2026

Summary

  • LazyChart: new IntersectionObserver wrapper that defers chart mounting until in viewport (fixes performance on >24h ranges)
  • NodeStatusChart: node count over time with scale events (+1 node / -1 node) shown as reference lines and in the sidebar
  • CpuThrottlingChart: % of time container was throttled by CPU limit, added to Resources section
  • CardNodeEvents: Prometheus-based table of node infrastructure events (DiskPressure, MemoryPressure, NodeNotReady, Karpenter lifecycle...) filtered by object_kind=~"Node|NodeClaim" with color-coded reasons
  • Event sidebar: Repository/Version fields now hidden when empty; redundant timestamp description removed from node scale events

Guimove added 2 commits March 10, 2026 11:36
…on labels

- Add `Killing` reason to K8s event query in instance-status-chart to capture kubelet container termination events
- Update `Evicted` event description to mention Karpenter node consolidation explicitly
- Add new `Killing` case to getDescriptionFromK8sEvent with context on node consolidation and resource pressure
- Add new `CardNodeEvents` component showing Karpenter node lifecycle events (scale up/down, consolidation) fetched via `getClusterKubernetesEvents` API with `karpenter.sh` reporting component filter
- Integrate `CardNodeEvents` into service-dashboard between "Service health check" and "Resources" sections; card renders nothing when Karpenter is not present
…g and improved events

- Add LazyChart wrapper with IntersectionObserver to defer chart rendering until in viewport
- Add NodeStatusChart (node count over time with scale events in sidebar)
- Add CpuThrottlingChart to resources section
- Add CardNodeEvents table using Prometheus k8s_event_logger metric
- Filter node events by object_kind=~Node|NodeClaim with relevant reasons only
- Color-code event reasons (red=errors, green=launched, orange=lifecycle)
- Hide Repository/Version in event sidebar when empty
- Remove redundant description from node scale events in sidebar
- Simplify isAutoscalingEnabled match branches
@jul-dan
Copy link
Contributor

jul-dan commented Mar 10, 2026

Qovery Preview

Qovery can create a Preview Environment for this PR.
To trigger its creation, please post a comment with one of the following command.

Command Blueprint environment
/qovery preview 964984c5-fba6-4371-88d3-a5daf99642ab test-prod
/qovery preview 28c47145-c8e7-4b9d-8d9e-c65c95b48425 staging
/qovery preview cc1de7de-94e5-40f8-8e45-bc8986d9dfec storybook
/qovery preview {all|UUID1,UUID2,...} To preview multiple environments

This comment has been generated from Qovery AI 🤖.
Below, a word from its wisdom :

Help yourself at 2AM by putting some metrics to help observability

@Guimove Guimove force-pushed the feat/observability-karpenter-node-events branch from 7ed36fb to e07c36f Compare March 10, 2026 15:56
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 2.56410% with 114 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.52%. Comparing base (7304e19) to head (e07c36f).

Files with missing lines Patch % Lines
...-dashboard/node-status-chart/node-status-chart.tsx 0.00% 40 Missing ⚠️
...ce-dashboard/card-node-events/card-node-events.tsx 0.00% 22 Missing ⚠️
...oard/cpu-throttling-chart/cpu-throttling-chart.tsx 0.00% 19 Missing ⚠️
...vability/feature/src/lib/lazy-chart/lazy-chart.tsx 0.00% 13 Missing ⚠️
...ib/service/service-dashboard/service-dashboard.tsx 0.00% 9 Missing ⚠️
...ce-dashboard/card-node-status/card-node-status.tsx 0.00% 6 Missing ⚠️
...lity/feature/src/lib/local-chart/event-sidebar.tsx 50.00% 0 Missing and 2 partials ⚠️
...rd/instance-status-chart/instance-status-chart.tsx 0.00% 2 Missing ⚠️
...oard/card-instance-status/card-instance-status.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2462      +/-   ##
===========================================
+ Coverage    46.00%   48.52%   +2.52%     
===========================================
  Files          133      413     +280     
  Lines         3167     9873    +6706     
  Branches       966     3012    +2046     
===========================================
+ Hits          1457     4791    +3334     
- Misses        1377     4166    +2789     
- Partials       333      916     +583     
Flag Coverage Δ
unittests 48.52% <2.56%> (+2.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acarranoqovery
Copy link
Contributor

/qovery preview 28c47145-c8e7-4b9d-8d9e-c65c95b48425

@RemiBonnet
Copy link
Member

Qovery Preview

A preview environment was automatically created via Qovery.
Click on the link below to follow its deployment and use it.
👉 [PR] staging - feat(observability): add node infrastructure section with lazy loading and node events - 2026-03-11T09:19:39Z

Another comment will be posted when deployments are finished

@RemiBonnet
Copy link
Member

Qovery Preview

Your preview environment has been successfully deployed !
Click on the link below to open your service:
👉 console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants