|
@@ -76,6 +76,8 @@ export const AGGREGATES = [...COUNTER_AGGREGATES, ...DISTRIBUTION_AGGREGATES] as
|
|
|
|
|
|
export type Aggregate = (typeof AGGREGATES)[number];
|
|
export type Aggregate = (typeof AGGREGATES)[number];
|
|
|
|
|
|
|
|
+export type ConditionalAggregate = `avg_if` | `count_op`;
|
|
|
|
+
|
|
export const SPAN_FUNCTIONS = [
|
|
export const SPAN_FUNCTIONS = [
|
|
'sps',
|
|
'sps',
|
|
'spm',
|
|
'spm',
|
|
@@ -118,6 +120,11 @@ export type MetricsResponse = {
|
|
[Function in RegressionFunctions]: number;
|
|
[Function in RegressionFunctions]: number;
|
|
} & {
|
|
} & {
|
|
[Function in SpanAnyFunction]: string;
|
|
[Function in SpanAnyFunction]: string;
|
|
|
|
+} & {
|
|
|
|
+ [Property in ConditionalAggregate as
|
|
|
|
+ | `${Property}(${string})`
|
|
|
|
+ | `${Property}(${string},${string})`
|
|
|
|
+ | `${Property}(${string},${string},${string})`]: number;
|
|
};
|
|
};
|
|
|
|
|
|
export type MetricsFilters = {
|
|
export type MetricsFilters = {
|
|
@@ -158,6 +165,9 @@ export enum SpanIndexedField {
|
|
TOTAL_SCORE = 'measurements.score.total',
|
|
TOTAL_SCORE = 'measurements.score.total',
|
|
RESPONSE_CODE = 'span.status_code',
|
|
RESPONSE_CODE = 'span.status_code',
|
|
CACHE_HIT = 'cache.hit',
|
|
CACHE_HIT = 'cache.hit',
|
|
|
|
+ MESSAGE_ID = 'message.id',
|
|
|
|
+ MESSAGE_SIZE = 'message.size',
|
|
|
|
+ MESSAGE_STATUS = 'message.status',
|
|
}
|
|
}
|
|
|
|
|
|
export type IndexedResponse = {
|
|
export type IndexedResponse = {
|
|
@@ -192,6 +202,9 @@ export type IndexedResponse = {
|
|
[SpanIndexedField.TOTAL_SCORE]: number;
|
|
[SpanIndexedField.TOTAL_SCORE]: number;
|
|
[SpanIndexedField.RESPONSE_CODE]: string;
|
|
[SpanIndexedField.RESPONSE_CODE]: string;
|
|
[SpanIndexedField.CACHE_HIT]: '' | 'true' | 'false';
|
|
[SpanIndexedField.CACHE_HIT]: '' | 'true' | 'false';
|
|
|
|
+ [SpanIndexedField.MESSAGE_ID]: string;
|
|
|
|
+ [SpanIndexedField.MESSAGE_SIZE]: number;
|
|
|
|
+ [SpanIndexedField.MESSAGE_STATUS]: string;
|
|
};
|
|
};
|
|
|
|
|
|
export type IndexedProperty = keyof IndexedResponse;
|
|
export type IndexedProperty = keyof IndexedResponse;
|