Skip to content

Add telemetry related calls (for pipeline monitoring)#648

Open
nuclearcat wants to merge 7 commits intokernelci:mainfrom
nuclearcat:add-telemetry-models-api
Open

Add telemetry related calls (for pipeline monitoring)#648
nuclearcat wants to merge 7 commits intokernelci:mainfrom
nuclearcat:add-telemetry-models-api

Conversation

@nuclearcat
Copy link
Member

@nuclearcat nuclearcat commented Feb 13, 2026

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>
@nuclearcat nuclearcat force-pushed the add-telemetry-models-api branch from 6568cca to 7152a42 Compare February 13, 2026 08:15
…efactor get_telemetry_stats()

We add new method db.insert_many instead.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat nuclearcat force-pushed the add-telemetry-models-api branch from 13ffe2e to 31a5c15 Compare February 13, 2026 08:23
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.

1 participant