khora_core/telemetry/event.rs
1// Copyright 2025 eraflo
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Event types for engine-wide telemetry.
16
17use crate::telemetry::metrics::{MetricId, MetricValue};
18use crate::telemetry::monitoring::{GpuReport, HardwareReport, ResourceUsageReport};
19
20/// A high-level telemetry event produced by the Hot Path or hardware sensors.
21#[derive(Debug, Clone)]
22pub enum TelemetryEvent {
23 /// A single metric sample update.
24 MetricUpdate {
25 /// The metric identifier.
26 id: MetricId,
27 /// The new value.
28 value: MetricValue,
29 },
30 /// A hardware resource usage report (typically bytes/memory).
31 ResourceReport(ResourceUsageReport),
32 /// A physical hardware health report (thermal, CPU load).
33 HardwareReport(HardwareReport),
34 /// A GPU performance report (frame timings, draw calls, triangles).
35 GpuReport(GpuReport),
36 /// A change in the execution phase signaled by the engine.
37 PhaseChange(String),
38}