Add telemetry related calls (for pipeline monitoring)#648
Open
nuclearcat wants to merge 7 commits intokernelci:mainfrom
Open
Add telemetry related calls (for pipeline monitoring)#648nuclearcat wants to merge 7 commits intokernelci:mainfrom
nuclearcat wants to merge 7 commits intokernelci:mainfrom
Conversation
Add TelemetryEvent model to the COLLECTIONS dict so the telemetry MongoDB collection is created at startup with TTL and compound indexes. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add endpoint for pipeline services to submit telemetry events in bulk. Validates each event against the TelemetryEvent model and uses insert_many for efficient batch insertion. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add paginated query endpoint for telemetry events with support for filtering by any field (kind, runtime, device_type, job_name, result, is_infra_error, etc.) plus time range via since/until parameters. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add aggregation endpoint that groups telemetry events by configurable fields (runtime, device_type, job_name, tree, branch, arch, kind, error_type) and returns pass/fail/incomplete/skip/infra_error counts. Supports filtering by kind, runtime, device_type, job_name, tree, branch, arch, and time range (since/until) before aggregation. Also adds a generic db.aggregate() method for running MongoDB aggregation pipelines. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add on-demand anomaly detection endpoint that identifies: 1. Runtime+device_type combinations with high infra error or failure rates exceeding a configurable threshold 2. Runtimes with recurring submission/connectivity errors Parameters: window (1h-48h), threshold (0.0-1.0), min_total (minimum event count to avoid noise from small samples). Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
6568cca to
7152a42
Compare
…efactor get_telemetry_stats() We add new method db.insert_many instead. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
13ffe2e to
31a5c15
Compare
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.
Related to: kernelci/kernelci-pipeline#1419