Skip to content

Comments

Add telemetry models api#3049

Merged
nuclearcat merged 2 commits intokernelci:mainfrom
nuclearcat:add-telemetry-models-api
Feb 16, 2026
Merged

Add telemetry models api#3049
nuclearcat merged 2 commits intokernelci:mainfrom
nuclearcat:add-telemetry-models-api

Conversation

@nuclearcat
Copy link
Member

This is groundwork to introduce models required by kernelci/kernelci-pipeline#1419

Add a new TelemetryEvent database model to capture structured telemetry
events from pipeline services. This enables tracking of scheduler
submissions, runtime errors, job skips, and test results across all
runtimes, we will send this telemetry events from pipeline to api.

The collection uses a 14-day TTL index (configurable via
TELEMETRY_TTL_SECONDS env var) for automatic cleanup, plus compound
indexes optimized for common query patterns (by kind, runtime+device_type,
job_name, and result+infra_error).

Also moves EVENT_HISTORY_TTL_SECONDS to the top of the file alongside
the new TELEMETRY_TTL_SECONDS constant for consistency.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Add abstract Telemetry interface and concrete LatestAPI implementation
for pipeline telemetry endpoints:
add(events): Bulk insert telemetry events via POST /telemetry
find(attributes): Query events with filters via GET /telemetry
stats(attributes): Get aggregated statistics via GET /telemetry/stats

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat nuclearcat added this pull request to the merge queue Feb 16, 2026
Merged via the queue into kernelci:main with commit 5834da9 Feb 16, 2026
8 checks passed
@nuclearcat nuclearcat deleted the add-telemetry-models-api branch February 16, 2026 09:43
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