Skip to content

Commit 37aad5c

Browse files
[Maps] remove SLA percentage metric (#65718)
* [Maps] remove SLA percentage metric * remove unused import Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 6bf0890 commit 37aad5c

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

x-pack/plugins/maps/public/layers/solution_layers/observability/create_layer_descriptor.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { i18n } from '@kbn/i18n';
99
import {
1010
AggDescriptor,
1111
ColorDynamicOptions,
12-
LabelDynamicOptions,
1312
LayerDescriptor,
1413
SizeDynamicOptions,
1514
StylePropertyField,
@@ -80,10 +79,6 @@ function createLayerLabel(
8079
metricName = i18n.translate('xpack.maps.observability.durationMetricName', {
8180
defaultMessage: 'Duration',
8281
});
83-
} else if (metric === OBSERVABILITY_METRIC_TYPE.SLA_PERCENTAGE) {
84-
metricName = i18n.translate('xpack.maps.observability.slaPercentageMetricName', {
85-
defaultMessage: '% Duration of SLA',
86-
});
8782
} else if (metric === OBSERVABILITY_METRIC_TYPE.COUNT) {
8883
metricName = i18n.translate('xpack.maps.observability.countMetricName', {
8984
defaultMessage: 'Total',
@@ -103,11 +98,6 @@ function createAggDescriptor(metric: OBSERVABILITY_METRIC_TYPE): AggDescriptor {
10398
type: AGG_TYPE.AVG,
10499
field: 'transaction.duration.us',
105100
};
106-
} else if (metric === OBSERVABILITY_METRIC_TYPE.SLA_PERCENTAGE) {
107-
return {
108-
type: AGG_TYPE.AVG,
109-
field: 'duration_sla_pct',
110-
};
111101
} else if (metric === OBSERVABILITY_METRIC_TYPE.UNIQUE_COUNT) {
112102
return {
113103
type: AGG_TYPE.UNIQUE_COUNT,
@@ -251,16 +241,6 @@ export function createLayerDescriptor({
251241
},
252242
};
253243

254-
if (metric === OBSERVABILITY_METRIC_TYPE.SLA_PERCENTAGE) {
255-
styleProperties[VECTOR_STYLES.LABEL_TEXT] = {
256-
type: STYLE_TYPE.DYNAMIC,
257-
options: {
258-
...(defaultDynamicProperties[VECTOR_STYLES.LABEL_TEXT]!.options as LabelDynamicOptions),
259-
field: metricStyleField,
260-
},
261-
};
262-
}
263-
264244
return VectorLayer.createDescriptor({
265245
label,
266246
query: apmSourceQuery,

x-pack/plugins/maps/public/layers/solution_layers/observability/metric_select.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { OBSERVABILITY_LAYER_TYPE } from './layer_select';
1111

1212
export enum OBSERVABILITY_METRIC_TYPE {
1313
TRANSACTION_DURATION = 'TRANSACTION_DURATION',
14-
SLA_PERCENTAGE = 'SLA_PERCENTAGE',
1514
COUNT = 'COUNT',
1615
UNIQUE_COUNT = 'UNIQUE_COUNT',
1716
}
@@ -23,12 +22,6 @@ const APM_RUM_PERFORMANCE_METRIC_OPTIONS = [
2322
defaultMessage: 'Transaction duraction',
2423
}),
2524
},
26-
{
27-
value: OBSERVABILITY_METRIC_TYPE.SLA_PERCENTAGE,
28-
text: i18n.translate('xpack.maps.observability.slaPercentageLabel', {
29-
defaultMessage: 'SLA percentage',
30-
}),
31-
},
3225
];
3326

3427
const APM_RUM_TRAFFIC_METRIC_OPTIONS = [

0 commit comments

Comments
 (0)