add histogram for gpa fetch
This commit is contained in:
@@ -37,6 +37,7 @@ enum METRIC_TYPES {
|
||||
runtime_specs = 'runtime_specs',
|
||||
endpoint_response_times_histogram = 'endpoint_response_times_histogram',
|
||||
endpoint_response_status = 'endpoint_response_status',
|
||||
gpa_fetch_duration = 'endpoint_response_status',
|
||||
health_status = 'health_status',
|
||||
}
|
||||
|
||||
@@ -70,6 +71,12 @@ const meterProvider = new MeterProvider({
|
||||
meterName,
|
||||
aggregation: createHistogramBuckets(0, 20, 30),
|
||||
}),
|
||||
new View({
|
||||
instrumentName: METRIC_TYPES.gpa_fetch_duration,
|
||||
instrumentType: InstrumentType.HISTOGRAM,
|
||||
meterName,
|
||||
aggregation: createHistogramBuckets(0, 500, 20),
|
||||
}),
|
||||
],
|
||||
});
|
||||
meterProvider.addMetricReader(exporter);
|
||||
@@ -109,6 +116,13 @@ const endpointResponseTimeHistogram = meter.createHistogram(
|
||||
unit: 'ms',
|
||||
}
|
||||
);
|
||||
const gpaFetchDurationHistogram = meter.createHistogram(
|
||||
METRIC_TYPES.gpa_fetch_duration,
|
||||
{
|
||||
description: 'Duration of GPA fetches',
|
||||
unit: 'ms',
|
||||
}
|
||||
);
|
||||
|
||||
const responseStatusCounter = meter.createCounter(
|
||||
METRIC_TYPES.endpoint_response_status,
|
||||
@@ -170,6 +184,7 @@ const handleHealthCheck = (slotSource: SlotSource) => {
|
||||
|
||||
export {
|
||||
endpointResponseTimeHistogram,
|
||||
gpaFetchDurationHistogram,
|
||||
responseStatusCounter,
|
||||
handleHealthCheck,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user