feat: add time-window support for Prometheus telemetry collection#1054
feat: add time-window support for Prometheus telemetry collection#1054Sypher845 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds time-window support for Prometheus telemetry collection, allowing krkn to collect metrics only for the relevant time window (test duration plus configurable buffers) instead of the entire Prometheus database. This optimization significantly reduces collection time by 70-85%.
Changes:
- Updated telemetry function calls in
run_kraken.pyto pass test timestamps and Prometheus API credentials to krkn-lib functions - Added three new configuration parameters to enable API-based collection and configure time windows
- Applied configuration changes consistently across all config files
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| run_kraken.py | Added start_time, end_time, prometheus_url, and prometheus_bearer_token parameters to telemetry collection function calls |
| config/config.yaml | Added three new telemetry configuration options for API-based collection and time windows |
| config/config_performance.yaml | Added the same three new telemetry configuration options |
| CI/config/common_test_config.yaml | Added the same three new telemetry configuration options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi, @paigerube14 @chaitanyaenr the license compliance test is failing, I can't get through it can you pls check it. |
don't need to worry about the license check, can merge without that passing |
|
@paigerube14 Hi! This PR is now ready for review. All CI checks are passing, and I’ve addressed the requirements for [Issue #881]. Could you please take a look |
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
2056060 to
3f01720
Compare
|
@paigerube14 any update ? |
|
Hi @Sypher845! 👋 This PR has merge conflicts with To rebase your branch: git fetch upstream
git rebase upstream/main
# resolve any conflicts, then:
git add .
git rebase --continue
git push --force-with-lease
For more details, see the Rebase with upstream guide. The |
|
Hi @Sypher845! 👋 One or more commits in this PR are missing a Unsigned commits:
To fix, rebase and sign off all commits: git rebase HEAD~2 --signoff
git push --force-with-leaseOr, to sign off every commit in this PR at once: git rebase origin/main --signoff
git push --force-with-lease
The |
Type of change
Description
This PR adds time-window support for Prometheus telemetry collection, enabling significantly faster metrics gathering by passing test timestamps and Prometheus API credentials to krkn-lib.
Changes Made
Code Changes
start_time,end_time,prometheus_url, andprometheus_bearer_tokenparameters toget_ocp_prometheus_data()andget_prometheus_pod_data()Configuration Changes
Added three new configuration options to all config files:
prometheus_backup_use_api: True- Enable Prometheus HTTP API-based collection (default: True)prometheus_time_window_minutes_before: 10- Minutes before test start to collect metrics (default: 10)prometheus_time_window_minutes_after: 10- Minutes after test end to collect metrics (default: 10)Files updated:
config/config.yamlconfig/config_performance.yamlCI/config/common_test_config.yamlHow It Works
When used with the updated krkn-lib:
Related Tickets & Documents
Dependencies:
Checklist before requesting a review
REQUIRED:
Description of combination of tests performed and output of run
I am working on the tests