Class MetricRecordEntity
java.lang.Object
com.nmontytskyi.monitoring.server.entity.MetricRecordEntity
JPA entity representing a single point-in-time measurement for a microservice.
Records arrive via two channels:
- PUSH — sent by the
monitoring-spring-boot-starterAOP aspect after each intercepted HTTP request. Contains endpoint-level granularity (response time, status) but no system-level metrics (CPU, heap). - PULL — collected by the server-side scheduler via Actuator endpoints every 30 seconds. Contains service-level metrics (CPU, heap) but no endpoint granularity.
The anomaly and zScore fields are populated by
AnomalyDetector immediately after the record is persisted.
Maps to the metric_records table.
A composite index on (service_id, recorded_at DESC) supports
efficient time-range and anomaly-window queries.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOrigin of aMetricRecordEntity: whether the server pulled it from the Actuator endpoint or the starter pushed it after an HTTP request. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MetricRecordEntity
public MetricRecordEntity()
-