add current system ts metric
This commit is contained in:
@@ -39,6 +39,7 @@ enum METRIC_TYPES {
|
||||
endpoint_response_status = 'endpoint_response_status',
|
||||
gpa_fetch_duration = 'gpa_fetch_duration',
|
||||
last_ws_message_received_ts = 'last_ws_message_received_ts',
|
||||
current_system_ts = 'current_system_ts',
|
||||
health_status = 'health_status',
|
||||
}
|
||||
|
||||
@@ -124,6 +125,16 @@ lastWsReceivedTsGauge.addCallback((obs: ObservableResult) => {
|
||||
obs.observe(lastWsMsgReceivedTs, {});
|
||||
});
|
||||
|
||||
const currentSystemTsGauge = meter.createObservableGauge(
|
||||
METRIC_TYPES.current_system_ts,
|
||||
{
|
||||
description: 'Timestamp of system at time of metric collection',
|
||||
}
|
||||
);
|
||||
currentSystemTsGauge.addCallback((obs: ObservableResult) => {
|
||||
obs.observe(Date.now(), {});
|
||||
});
|
||||
|
||||
const endpointResponseTimeHistogram = meter.createHistogram(
|
||||
METRIC_TYPES.endpoint_response_times_histogram,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user