diff --git a/x-pack/plugins/observability/public/components/app/section/ux/index.tsx b/x-pack/plugins/observability/public/components/app/section/ux/index.tsx index da5bffd6cb186..f42db26b1e7d0 100644 --- a/x-pack/plugins/observability/public/components/app/section/ux/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/ux/index.tsx @@ -50,6 +50,7 @@ export function UXSection({ bucketSize }: Props) { breakdown: SERVICE_NAME, dataType: 'ux' as AppDataType, selectedMetricField: TRANSACTION_DURATION, + showPercentileAnnotations: false, }, ]; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/url_constants.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/url_constants.ts index 32ac0b91b830b..df2f31481016d 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/url_constants.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/constants/url_constants.ts @@ -16,6 +16,7 @@ export enum URL_KEYS { HIDDEN = 'h', NAME = 'n', COLOR = 'c', + SHOW_PERCENTILE_ANNOTATIONS = 'spa', } export const ALL_VALUES_SELECTED = 'ALL_VALUES'; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts index 9da4e2d1e41ed..30870e38fdd4f 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes.ts @@ -120,6 +120,7 @@ export interface LayerConfig { selectedMetricField: string; color: string; name: string; + showPercentileAnnotations?: boolean; } export class LensAttributes { @@ -600,7 +601,8 @@ export class LensAttributes { columnFilters, timeScale, paramFilters, - showPercentileAnnotations, + showPercentileAnnotations: + layerConfig.showPercentileAnnotations ?? showPercentileAnnotations, }; } else { const fieldMeta = layerConfig.indexPattern.getFieldByName(sourceField); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts index 0a55fc95356fd..412bf2ef87f6b 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/synthetics/data_distribution_config.ts @@ -65,7 +65,6 @@ export function getSyntheticsDistributionConfig({ series, dataView }: ConfigProp label: MONITORS_DURATION_LABEL, id: MONITOR_DURATION_US, field: MONITOR_DURATION_US, - showPercentileAnnotations: true, }, { label: LCP_LABEL, diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.ts index e9e1be1be4cac..9e82c80802640 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_lens_attributes.ts @@ -84,6 +84,7 @@ export function getLayerConfigs( reportDefinitions: series.reportDefinitions ?? {}, selectedMetricField: series.selectedMetricField, color: series.color ?? (theme.eui as unknown as Record)[color], + showPercentileAnnotations: series.showPercentileAnnotations, }); } }); diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_series_storage.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_series_storage.tsx index a73c4caf10159..9cbddbbde9965 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_series_storage.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_series_storage.tsx @@ -152,7 +152,7 @@ export function useSeriesStorage() { } function convertFromShortUrl(newValue: ShortUrlSeries): SeriesUrl { - const { dt, op, st, bd, ft, time, rdf, mt, h, n, c, ...restSeries } = newValue; + const { dt, op, st, bd, ft, time, rdf, mt, h, n, c, spa, ...restSeries } = newValue; return { operationType: op, seriesType: st, @@ -165,6 +165,7 @@ function convertFromShortUrl(newValue: ShortUrlSeries): SeriesUrl { hidden: h, name: n, color: c, + showPercentileAnnotations: spa, ...restSeries, }; } @@ -180,6 +181,7 @@ interface ShortUrlSeries { [URL_KEYS.HIDDEN]?: boolean; [URL_KEYS.NAME]: string; [URL_KEYS.COLOR]?: string; + [URL_KEYS.SHOW_PERCENTILE_ANNOTATIONS]?: boolean; time?: { to: string; from: string; diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts index 45e07c09c1430..09973e33b0dc2 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts @@ -102,6 +102,7 @@ export interface SeriesUrl { textReportDefinitions?: URLTextReportDefinition; selectedMetricField?: string; hidden?: boolean; + showPercentileAnnotations?: boolean; color?: string; }