Class MonitoringServerClient
java.lang.Object
com.nmontytskyi.monitoring.starter.client.MonitoringServerClient
HTTP client for communicating with the central monitoring server.
All calls are wrapped in try/catch so that monitoring failures never propagate to the client service's business logic.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpushMetric(MetricPushRequest request) Pushes a single metric snapshot (used by@MonitoredEndpointpath).voidpushMetricBatch(List<MetricPushRequest> batch) Pushes a batch of metric snapshots in a single HTTP call.Registers this service and returns the assigned service ID, ornullon failure.
-
Constructor Details
-
MonitoringServerClient
-
-
Method Details
-
registerService
Registers this service and returns the assigned service ID, ornullon failure. -
pushMetric
Pushes a single metric snapshot (used by@MonitoredEndpointpath). -
pushMetricBatch
Pushes a batch of metric snapshots in a single HTTP call. Throws on HTTP error so the caller (MetricsBuffer) can apply its re-queue fail-safe strategy.
-