From 2613008cca91a8afd3dc72e9b452fa04d4cd36c0 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 10 Jan 2023 20:26:19 -0500 Subject: [PATCH] Support Jaeger data in trace-analytics (#150) Signed-off-by: Derek Ho (cherry picked from commit f70041533baa9a826c6d928147309c9351d6c720) --- common/constants/explorer.ts | 1 + common/constants/trace_analytics.ts | 5 +- .../service_config.test.tsx.snap | 4 +- .../__tests__/create.test.tsx | 16 +- .../__tests__/service_config.test.tsx | 4 +- .../components/application.tsx | 5 +- .../config_components/service_config.tsx | 3 +- .../config_components/trace_config.tsx | 8 +- .../service_detail_flyout.tsx | 12 +- .../flyout_components/trace_detail_flyout.tsx | 2 +- .../flyout_components/trace_detail_render.tsx | 11 +- .../components/application_analytics/home.tsx | 7 +- .../explorer/events_views/docViewRow.tsx | 6 +- .../events_views/trace_block/trace_block.tsx | 5 +- .../__snapshots__/search_bar.test.tsx.snap | 2 + .../__tests__/helper_functions.test.tsx | 5 +- .../common/__tests__/search_bar.test.tsx | 1 + .../__tests__/filter_edit_popover.test.tsx | 2 +- .../filters/__tests__/filter_helpers.test.tsx | 6 +- .../common/filters/filter_helpers.tsx | 16 +- .../components/common/filters/filters.tsx | 6 +- .../components/common/helper_functions.tsx | 54 +- .../error_rate_plt_.test.tsx.snap | 20 +- .../throughput_plt.test.tsx.snap | 16 +- .../common/plots/error_rate_plt.tsx | 20 +- .../common/plots/throughput_plt.tsx | 14 +- .../components/common/search_bar.tsx | 1 + .../__snapshots__/dashboard.test.tsx.snap | 5010 +++++++++++++---- .../__snapshots__/mode_picker.test.tsx.snap | 805 +++ .../top_error_rates_table.test.tsx.snap | 2195 ++++++++ .../top_latency_table.test.tsx.snap | 3167 +++++++++++ .../dashboard/__tests__/dashboard.test.tsx | 58 +- .../dashboard/__tests__/mode_picker.test.tsx | 30 + .../__tests__/top_error_rates_table.test.tsx | 76 + .../__tests__/top_latency_table.test.tsx | 76 + .../components/dashboard/dashboard.tsx | 12 +- .../dashboard/dashboard_content.tsx | 246 +- .../components/dashboard/dashboard_table.tsx | 3 +- .../components/dashboard/mode_picker.tsx | 99 + .../dashboard/top_error_rates_table.tsx | 273 + .../components/dashboard/top_groups_page.tsx | 78 + .../dashboard/top_latency_table.tsx | 407 ++ .../__snapshots__/service_view.test.tsx.snap | 1 + .../__snapshots__/services.test.tsx.snap | 1745 +++++- .../services_table.test.tsx.snap | 1562 ++++- .../services/__tests__/service_view.test.tsx | 2 +- .../services/__tests__/services.test.tsx | 59 +- .../__tests__/services_table.test.tsx | 63 +- .../components/services/service_view.tsx | 87 +- .../components/services/services.tsx | 2 + .../components/services/services_content.tsx | 39 +- .../components/services/services_table.tsx | 29 +- .../span_detail_flyout.test.tsx.snap | 1 + .../span_detail_panel.test.tsx.snap | 1 + .../span_detail_table.test.tsx.snap | 25 + .../__snapshots__/trace_view.test.tsx.snap | 1 + .../__snapshots__/traces.test.tsx.snap | 1733 +++++- .../__snapshots__/traces_table.test.tsx.snap | 1391 ++++- .../__tests__/span_detail_flyout.test.tsx | 2 + .../__tests__/span_detail_panel.test.tsx | 2 +- .../__tests__/span_detail_table.test.tsx | 25 +- .../traces/__tests__/trace_view.test.tsx | 1 + .../traces/__tests__/traces.test.tsx | 57 +- .../traces/__tests__/traces_table.test.tsx | 43 +- .../components/traces/span_detail_flyout.tsx | 36 +- .../components/traces/span_detail_panel.tsx | 26 +- .../components/traces/span_detail_table.tsx | 91 +- .../components/traces/trace_view.tsx | 48 +- .../components/traces/traces.tsx | 2 + .../components/traces/traces_content.tsx | 21 +- .../components/traces/traces_table.tsx | 91 +- public/components/trace_analytics/home.tsx | 66 +- .../requests/dashboard_request_handler.ts | 225 +- .../requests/queries/dashboard_queries.ts | 716 ++- .../requests/queries/services_queries.ts | 194 +- .../requests/queries/traces_queries.ts | 225 +- .../requests/request_handler.ts | 41 +- .../requests/services_request_handler.ts | 32 +- .../requests/traces_request_handler.ts | 101 +- server/routes/trace_analytics_dsl_router.ts | 34 +- test/constants.ts | 57 + 81 files changed, 19997 insertions(+), 1667 deletions(-) create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/mode_picker.test.tsx.snap create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/top_error_rates_table.test.tsx.snap create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/top_latency_table.test.tsx.snap create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/mode_picker.test.tsx create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/top_error_rates_table.test.tsx create mode 100644 public/components/trace_analytics/components/dashboard/__tests__/top_latency_table.test.tsx create mode 100644 public/components/trace_analytics/components/dashboard/mode_picker.tsx create mode 100644 public/components/trace_analytics/components/dashboard/top_error_rates_table.tsx create mode 100644 public/components/trace_analytics/components/dashboard/top_groups_page.tsx create mode 100644 public/components/trace_analytics/components/dashboard/top_latency_table.tsx diff --git a/common/constants/explorer.ts b/common/constants/explorer.ts index 75393f1775..73a763d27c 100644 --- a/common/constants/explorer.ts +++ b/common/constants/explorer.ts @@ -43,6 +43,7 @@ export const REDIRECT_TAB = 'redirect_tab'; export const PAGE_SIZE = 50; export const DEFAULT_COLUMNS = ['', 'Time', '_source']; export const OTEL_TRACE_ID = 'traceId'; +export const JAEGER_TRACE_ID = 'traceID'; export const DATE_PICKER_FORMAT = 'YYYY-MM-DD HH:mm:ss'; export const TIME_INTERVAL_OPTIONS = [ { diff --git a/common/constants/trace_analytics.ts b/common/constants/trace_analytics.ts index f480a25f6d..e1ea188715 100644 --- a/common/constants/trace_analytics.ts +++ b/common/constants/trace_analytics.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +export const JAEGER_INDEX_NAME = '*jaeger-span-*'; +export const JAEGER_SERVICE_INDEX_NAME = '*jaeger-service*'; export const DATA_PREPPER_INDEX_NAME = 'otel-v1-apm-span-*'; export const DATA_PREPPER_SERVICE_INDEX_NAME = 'otel-v1-apm-service-map*'; export const TRACE_ANALYTICS_DATE_FORMAT = 'MM/DD/YYYY HH:mm:ss'; @@ -13,5 +15,6 @@ export const SERVICE_MAP_MAX_EDGES = 1000; export const TRACES_MAX_NUM = 3000; export const TRACE_ANALYTICS_DOCUMENTATION_LINK = 'https://opensearch.org/docs/latest/observability-plugin/trace/index/'; -export const TRACE_ANALYTICS_INDICES_ROUTE = '/api/observability/trace_analytics/indices'; +export const TRACE_ANALYTICS_JAEGER_INDICES_ROUTE = '/api/observability/trace_analytics/jaeger_indices'; +export const TRACE_ANALYTICS_DATA_PREPPER_INDICES_ROUTE = '/api/observability/trace_analytics/data_prepper_indices'; export const TRACE_ANALYTICS_DSL_ROUTE = '/api/observability/trace_analytics/query'; diff --git a/public/components/application_analytics/__tests__/__snapshots__/service_config.test.tsx.snap b/public/components/application_analytics/__tests__/__snapshots__/service_config.test.tsx.snap index 72c328ba59..8b128989e8 100644 --- a/public/components/application_analytics/__tests__/__snapshots__/service_config.test.tsx.snap +++ b/public/components/application_analytics/__tests__/__snapshots__/service_config.test.tsx.snap @@ -21,7 +21,7 @@ exports[`Service Config component renders empty service config 1`] = ` endTime="now" filters={Array []} http={[MockFunction]} - indicesExist={true} + mode="data_prepper" name="" parentBreadcrumb={ Object { @@ -1101,7 +1101,7 @@ exports[`Service Config component renders with one service selected 1`] = ` ] } http={[MockFunction]} - indicesExist={true} + mode="data_prepper" name="" parentBreadcrumb={ Object { diff --git a/public/components/application_analytics/__tests__/create.test.tsx b/public/components/application_analytics/__tests__/create.test.tsx index 5fda0c03a8..15cfb1c6c5 100644 --- a/public/components/application_analytics/__tests__/create.test.tsx +++ b/public/components/application_analytics/__tests__/create.test.tsx @@ -56,9 +56,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -120,9 +120,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="Chic Application" description="This is my chic application." + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -184,9 +184,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -251,9 +251,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -327,9 +327,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -403,9 +403,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -479,9 +479,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} @@ -555,9 +555,9 @@ describe('Create Page', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} name="" description="" + mode='data_prepper' setNameWithStorage={setNameWithStorage} setDescriptionWithStorage={setDescriptionWithStorage} setQueryWithStorage={setQueryWithStorage} diff --git a/public/components/application_analytics/__tests__/service_config.test.tsx b/public/components/application_analytics/__tests__/service_config.test.tsx index d574ba9427..e12847295a 100644 --- a/public/components/application_analytics/__tests__/service_config.test.tsx +++ b/public/components/application_analytics/__tests__/service_config.test.tsx @@ -46,7 +46,7 @@ describe('Service Config component', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} + mode='data_prepper' dslService={dslService} selectedServices={[]} setSelectedServices={setSelectedServices} @@ -108,7 +108,7 @@ describe('Service Config component', () => { setStartTime={setStartTime} endTime="now" setEndTime={setEndTime} - indicesExist={true} + mode='data_prepper' dslService={dslService} selectedServices={[]} setSelectedServices={setSelectedServices} diff --git a/public/components/application_analytics/components/application.tsx b/public/components/application_analytics/components/application.tsx index 69006f179f..b758942583 100644 --- a/public/components/application_analytics/components/application.tsx +++ b/public/components/application_analytics/components/application.tsx @@ -113,6 +113,7 @@ export function Application(props: AppDetailProps) { setFilters, callback, queryManager, + mode, } = props; const [application, setApplication] = useState({ id: '', @@ -230,7 +231,7 @@ export function Application(props: AppDetailProps) { }, [appId, application.name]); useEffect(() => { - const DSL = filtersToDsl(filters, query, appStartTime, appEndTime, 'app', appConfigs); + const DSL = filtersToDsl(mode, filters, query, appStartTime, appEndTime, 'app', appConfigs); setSpanDSL(DSL); }, [filters, appConfigs, query, appStartTime, appEndTime]); @@ -350,6 +351,7 @@ export function Application(props: AppDetailProps) { openFlyout={setSpanFlyoutId} DSL={spanDSL} setTotal={setTotalSpans} + mode='data_prepper' /> @@ -563,6 +565,7 @@ export function Application(props: AppDetailProps) { isFlyoutVisible={!!spanFlyoutId} closeFlyout={closeSpanFlyout} addSpanFilter={addSpanFilter} + mode="data_prepper" /> )} {traceFlyoutId && ( diff --git a/public/components/application_analytics/components/config_components/service_config.tsx b/public/components/application_analytics/components/config_components/service_config.tsx index 30b78adcdc..bfeb5029fa 100644 --- a/public/components/application_analytics/components/config_components/service_config.tsx +++ b/public/components/application_analytics/components/config_components/service_config.tsx @@ -40,6 +40,7 @@ export const ServiceConfig = (props: ServiceConfigProps) => { selectedServices, setSelectedServices, } = props; + const { mode } = props; const [servicesOpen, setServicesOpen] = useState(false); const [serviceMap, setServiceMap] = useState({}); const [serviceMapIdSelected, setServiceMapIdSelected] = useState< @@ -49,7 +50,7 @@ export const ServiceConfig = (props: ServiceConfigProps) => { const [modalLayout, setModalLayout] = useState(); useEffect(() => { - handleServiceMapRequest(http, dslService, setServiceMap); + handleServiceMapRequest(http, dslService, mode, setServiceMap); }, []); useEffect(() => { diff --git a/public/components/application_analytics/components/config_components/trace_config.tsx b/public/components/application_analytics/components/config_components/trace_config.tsx index 92d0d40bf1..afa329aad4 100644 --- a/public/components/application_analytics/components/config_components/trace_config.tsx +++ b/public/components/application_analytics/components/config_components/trace_config.tsx @@ -17,7 +17,7 @@ import { } from '@elastic/eui'; import DSLService from 'public/services/requests/dsl'; import React, { useEffect, useState } from 'react'; -import { FilterType } from 'public/components/trace_analytics/components/common/filters/filters'; +import { FilterType } from '../../../../../public/components/trace_analytics/components/common/filters/filters'; import { OptionType } from '../../../../../common/types/application_analytics'; import { filtersToDsl } from '../../../trace_analytics/components/common/helper_functions'; import { handleDashboardRequest } from '../../../trace_analytics/requests/dashboard_request_handler'; @@ -42,6 +42,7 @@ export const TraceConfig = (props: TraceConfigProps) => { endTime, selectedTraces, setSelectedTraces, + mode } = props; const [traceOpen, setTraceOpen] = useState(false); const [loading, setLoading] = useState(false); @@ -54,9 +55,9 @@ export const TraceConfig = (props: TraceConfigProps) => { useEffect(() => { setLoading(true); - const timeFilterDSL = filtersToDsl([], '', startTime, endTime); + const timeFilterDSL = filtersToDsl(mode, [], '', startTime, endTime); const latencyTrendStartTime = dateMath.parse(endTime, { roundUp: true })?.subtract(24, 'hours').toISOString()!; - const latencyTrendDSL = filtersToDsl(filters, query, latencyTrendStartTime, endTime); + const latencyTrendDSL = filtersToDsl(mode, filters, query, latencyTrendStartTime, endTime); handleDashboardRequest( http, dslService, @@ -64,6 +65,7 @@ export const TraceConfig = (props: TraceConfigProps) => { latencyTrendDSL, traceItems, setTraceItems, + mode, setPercentileMap ).then(() => setLoading(false)); setRedirect(false); diff --git a/public/components/application_analytics/components/flyout_components/service_detail_flyout.tsx b/public/components/application_analytics/components/flyout_components/service_detail_flyout.tsx index 07a7e0a5a2..ecfc017542 100644 --- a/public/components/application_analytics/components/flyout_components/service_detail_flyout.tsx +++ b/public/components/application_analytics/components/flyout_components/service_detail_flyout.tsx @@ -19,7 +19,7 @@ import { handleServiceMapRequest, handleServiceViewRequest, } from '../../../../../public/components/trace_analytics/requests/services_request_handler'; -import { filtersToDsl } from '../../../../../public/components/trace_analytics/components/common/helper_functions'; +import { filtersToDsl, processTimeStamp } from '../../../../../public/components/trace_analytics/components/common/helper_functions'; import { ServiceMap } from '../../../../../public/components/trace_analytics/components/services'; import { ServiceObject } from '../../../../../public/components/trace_analytics/components/common/plots/service_map'; import { SpanDetailTable } from '../../../../../public/components/trace_analytics/components/traces/span_detail_table'; @@ -44,6 +44,7 @@ export function ServiceDetailFlyout(props: ServiceFlyoutProps) { query, closeServiceFlyout, openSpanFlyout, + mode, } = props; const [fields, setFields] = useState({}); const [serviceMap, setServiceMap] = useState({}); @@ -110,16 +111,17 @@ export function ServiceDetailFlyout(props: ServiceFlyoutProps) { DSL={DSL} openFlyout={openSpanFlyout} setTotal={setTotal} + mode={mode} /> ); }, [serviceName, fields, serviceMap, DSL, serviceMapIdSelected]); useEffect(() => { - const serviceDSL = filtersToDsl(filters, query, startTime, endTime, 'app', appConfigs); - handleServiceViewRequest(serviceName, http, serviceDSL, setFields); - handleServiceMapRequest(http, serviceDSL, setServiceMap, serviceName); - const spanDSL = filtersToDsl(filters, query, startTime, endTime, 'app', appConfigs); + const serviceDSL = filtersToDsl(mode, filters, query, processTimeStamp(startTime, mode), processTimeStamp(endTime, mode), 'app', appConfigs); + handleServiceViewRequest(serviceName, http, serviceDSL, setFields, mode); + handleServiceMapRequest(http, serviceDSL, mode, setServiceMap, serviceName); + const spanDSL = filtersToDsl(mode, filters, query, startTime, endTime, 'app', appConfigs); spanDSL.query.bool.must.push({ term: { serviceName, diff --git a/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx b/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx index ce687f306c..a5ec5569a2 100644 --- a/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx +++ b/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx @@ -17,7 +17,7 @@ interface TraceFlyoutProps extends TraceAnalyticsComponentDeps { export function TraceDetailFlyout(props: TraceFlyoutProps) { const { traceId, http, closeTraceFlyout, openSpanFlyout } = props; const renderContent = ( - + ); return ( diff --git a/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx b/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx index 34a91e01b1..bb55a94d96 100644 --- a/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx +++ b/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx @@ -14,14 +14,16 @@ import { } from '../../../trace_analytics/requests/traces_request_handler'; import { HttpStart } from '../../../../../../../src/core/public'; import { getListItem } from '../../helpers/utils'; +import { TraceAnalyticsMode } from '../../../../../public/components/trace_analytics/home'; interface TraceDetailRenderProps { traceId: string; http: HttpStart; openSpanFlyout: (spanId: string) => void; + mode : TraceAnalyticsMode } -export const TraceDetailRender = ({ traceId, http, openSpanFlyout }: TraceDetailRenderProps) => { +export const TraceDetailRender = ({ traceId, http, openSpanFlyout, mode }: TraceDetailRenderProps) => { const [fields, setFields] = useState({}); const [serviceBreakdownData, setServiceBreakdownData] = useState([]); const [payloadData, setPayloadData] = useState(''); @@ -66,6 +68,7 @@ export const TraceDetailRender = ({ traceId, http, openSpanFlyout }: TraceDetail colorMap={colorMap} page="app" openSpanFlyout={openSpanFlyout} + mode={mode} /> @@ -83,9 +86,9 @@ export const TraceDetailRender = ({ traceId, http, openSpanFlyout }: TraceDetail }, [traceId, fields, serviceBreakdownData, colorMap, payloadData]); useEffect(() => { - handleTraceViewRequest(traceId, http, fields, setFields); - handleServicesPieChartRequest(traceId, http, setServiceBreakdownData, setColorMap); - handlePayloadRequest(traceId, http, payloadData, setPayloadData); + handleTraceViewRequest(traceId, http, fields, setFields, mode); + handleServicesPieChartRequest(traceId, http, setServiceBreakdownData, setColorMap, mode); + handlePayloadRequest(traceId, http, payloadData, setPayloadData, mode); }, [traceId]); return renderContent; diff --git a/public/components/application_analytics/home.tsx b/public/components/application_analytics/home.tsx index 4e44470fd3..89dec51cfa 100644 --- a/public/components/application_analytics/home.tsx +++ b/public/components/application_analytics/home.tsx @@ -20,7 +20,7 @@ import { Application } from './components/application'; import { CreateApp } from './components/create'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; -import { handleIndicesExistRequest } from '../trace_analytics/requests/request_handler'; +import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; import { ObservabilitySideBar } from '../common/side_nav'; import { NotificationsStart } from '../../../../../src/core/public'; import { APP_ANALYTICS_API_PREFIX } from '../../../common/constants/application_analytics'; @@ -114,7 +114,7 @@ export const Home = (props: HomeProps) => { }; useEffect(() => { - handleIndicesExistRequest(http, setIndicesExist); + handleDataPrepperIndicesExistRequest(http, setIndicesExist); }, []); const commonProps: AppAnalyticsComponentDeps = { @@ -137,7 +137,8 @@ export const Home = (props: HomeProps) => { setStartTime, endTime, setEndTime, - indicesExist, + mode: 'data_prepper', + dataPrepperIndicesExist: indicesExist }; const setToast = (title: string, color = 'success', text?: ReactChild) => { diff --git a/public/components/event_analytics/explorer/events_views/docViewRow.tsx b/public/components/event_analytics/explorer/events_views/docViewRow.tsx index e1d0342156..c0da0366ab 100644 --- a/public/components/event_analytics/explorer/events_views/docViewRow.tsx +++ b/public/components/event_analytics/explorer/events_views/docViewRow.tsx @@ -12,7 +12,7 @@ import { useEffect } from 'react'; import { IExplorerFields, IField } from '../../../../../common/types/explorer'; import { DocFlyout } from './doc_flyout'; import { HttpStart } from '../../../../../../../src/core/public'; -import { OTEL_TRACE_ID, DATE_PICKER_FORMAT } from '../../../../../common/constants/explorer'; +import { OTEL_TRACE_ID, DATE_PICKER_FORMAT, JAEGER_TRACE_ID } from '../../../../../common/constants/explorer'; import { SurroundingFlyout } from './surrounding_flyout'; import PPLService from '../../../../services/requests/ppl'; import { isValidTraceId } from '../../utils'; @@ -77,13 +77,13 @@ export const DocViewRow = forwardRef((props: IDocViewRowProps, ref) => {
{toPairs(doc).map((entry: string[]) => { - const isTraceField = entry[0] === OTEL_TRACE_ID; + const isTraceField = (entry[0] === OTEL_TRACE_ID || entry[0] === JAEGER_TRACE_ID); return (
{entry[0]}:
- {isTraceField && isValidTraceId(entry[1]) && !isFlyout ? ( + {isTraceField && (isValidTraceId(entry[1]) || entry[0] === JAEGER_TRACE_ID) && !isFlyout ? ( {entry[1]} ) : ( entry[1] diff --git a/public/components/event_analytics/explorer/events_views/trace_block/trace_block.tsx b/public/components/event_analytics/explorer/events_views/trace_block/trace_block.tsx index e90476c926..98d62ddbd7 100644 --- a/public/components/event_analytics/explorer/events_views/trace_block/trace_block.tsx +++ b/public/components/event_analytics/explorer/events_views/trace_block/trace_block.tsx @@ -22,7 +22,7 @@ interface props { } export const TraceBlock = ({ http, hit, logTraceId }: props) => { - if (logTraceId === '' || !isValidTraceId(logTraceId)) { + if ((!hit.traceID || hit.traceID.length === 0) && (logTraceId === '' || !isValidTraceId(logTraceId))){ return ( <> @@ -42,6 +42,7 @@ export const TraceBlock = ({ http, hit, logTraceId }: props) => { ); } + const mode = (!hit.traceID || hit.traceID.length === 0) ? 'data_prepper' : 'jaeger' - return ; + return ; }; diff --git a/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap b/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap index 9c3997a729..ae5d60c25d 100644 --- a/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap +++ b/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap @@ -375,6 +375,7 @@ exports[`Search bar components renders search bar 1`] = ` appConfigs={Array []} endTime="now" filters={Array []} + mode="data_prepper" page="dashboard" query="test" refresh={[MockFunction]} @@ -974,6 +975,7 @@ exports[`Search bar components renders search bar 1`] = ` diff --git a/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx b/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx index 730db77b5a..335bd6c8bf 100644 --- a/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx +++ b/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx @@ -5,6 +5,7 @@ import { configure, mount, shallow } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; +import { TraceAnalyticsMode } from 'public/components/trace_analytics/home'; import React from 'react'; import { TEST_SERVICE_MAP, TEST_SERVICE_MAP_GRAPH } from '../../../../../../test/constants'; import { @@ -37,7 +38,7 @@ describe('Helper functions', () => { it('renders no match and missing configuration messages', () => { const noMatchMessage = shallow(); - const missingConfigurationMessage = shallow(); + const missingConfigurationMessage = shallow() expect(noMatchMessage).toMatchSnapshot(); expect(missingConfigurationMessage).toMatchSnapshot(); }); @@ -120,6 +121,7 @@ describe('Helper functions', () => { it('converts filters to DSL', () => { const getTestDslFromFilters = (field = 'traceGroup', operator = 'exists') => filtersToDsl( + 'data_prepper', [ { field, @@ -148,6 +150,7 @@ describe('Helper functions', () => { ); const customDSL = filtersToDsl( + 'data_prepper', [ { field: 'serviceName', diff --git a/public/components/trace_analytics/components/common/__tests__/search_bar.test.tsx b/public/components/trace_analytics/components/common/__tests__/search_bar.test.tsx index 9e0c8ed124..3a44d6535e 100644 --- a/public/components/trace_analytics/components/common/__tests__/search_bar.test.tsx +++ b/public/components/trace_analytics/components/common/__tests__/search_bar.test.tsx @@ -40,6 +40,7 @@ describe('Search bar components', () => { filters={[]} setFilters={setFilters} appConfigs={[]} + mode={'data_prepper'} /> ); expect(wrapper).toMatchSnapshot(); diff --git a/public/components/trace_analytics/components/common/filters/__tests__/filter_edit_popover.test.tsx b/public/components/trace_analytics/components/common/filters/__tests__/filter_edit_popover.test.tsx index 4d2b0f401c..c179423840 100644 --- a/public/components/trace_analytics/components/common/filters/__tests__/filter_edit_popover.test.tsx +++ b/public/components/trace_analytics/components/common/filters/__tests__/filter_edit_popover.test.tsx @@ -16,7 +16,7 @@ describe('Filter popover component', () => { it('renders filter popover', () => { const setFilter = jest.fn(); const closePopover = jest.fn(); - const filterFieldOptions = getFilterFields('dashboard').map((field) => ({ label: field })); + const filterFieldOptions = getFilterFields('data_prepper', 'dashboard').map((field) => ({ label: field })); const wrapper = mount( { configure({ adapter: new Adapter() }); it('returns fields by page', () => { - const fields = getFilterFields('dashboard'); + const fields = getFilterFields('data_prepper', 'dashboard'); expect(fields).toEqual([ 'traceGroup', 'serviceName', @@ -28,8 +28,8 @@ describe('Filter helper functions', () => { }); it('returns valid fields by page', () => { - const dashboardFields = getValidFilterFields('dashboard'); - const servicesFields = getValidFilterFields('services'); + const dashboardFields = getValidFilterFields('data_prepper', 'dashboard'); + const servicesFields = getValidFilterFields('data_prepper', 'services'); expect(dashboardFields).toEqual([ 'traceGroup', 'serviceName', diff --git a/public/components/trace_analytics/components/common/filters/filter_helpers.tsx b/public/components/trace_analytics/components/common/filters/filter_helpers.tsx index 1410bfea00..d2e52fee10 100644 --- a/public/components/trace_analytics/components/common/filters/filter_helpers.tsx +++ b/public/components/trace_analytics/components/common/filters/filter_helpers.tsx @@ -11,20 +11,26 @@ import { EuiSpacer, } from '@elastic/eui'; import _ from 'lodash'; +import { TraceAnalyticsMode } from 'public/components/trace_analytics/home'; import React from 'react'; -const getFields = (page: 'dashboard' | 'traces' | 'services' | 'app') => - ({ +const getFields = (mode: TraceAnalyticsMode, page: 'dashboard' | 'traces' | 'services' | 'app') => + (mode === 'data_prepper' ? { dashboard: ['traceGroup', 'serviceName', 'error', 'status.message', 'latency'], traces: ['traceId', 'traceGroup', 'serviceName', 'error', 'status.message', 'latency'], services: ['traceGroup', 'serviceName', 'error', 'status.message', 'latency'], app: ['traceId', 'traceGroup', 'serviceName'], + }[page] : { + dashboard: ['process.serviceName', 'error', 'latency'], + traces: ['traceID', 'operationName', 'process.serviceName', 'error', 'latency'], + services: ['process.serviceName', 'error', 'latency'], + app: ['traceID', 'process.serviceName'], }[page]); // filters will take effect and can be manually added -export const getFilterFields = (page: 'dashboard' | 'traces' | 'services' | 'app') => getFields(page); +export const getFilterFields = (mode: TraceAnalyticsMode, page: 'dashboard' | 'traces' | 'services' | 'app') => getFields(mode, page); // filters will take effect -export const getValidFilterFields = (page: 'dashboard' | 'traces' | 'services' | 'app') => { - const fields = getFields(page); +export const getValidFilterFields = (mode: TraceAnalyticsMode, page: 'dashboard' | 'traces' | 'services' | 'app') => { + const fields = getFields(mode, page); if (page !== 'services') return [...fields, 'Latency percentile within trace group']; return fields; }; diff --git a/public/components/trace_analytics/components/common/filters/filters.tsx b/public/components/trace_analytics/components/common/filters/filters.tsx index d5a296b151..ea06985eba 100644 --- a/public/components/trace_analytics/components/common/filters/filters.tsx +++ b/public/components/trace_analytics/components/common/filters/filters.tsx @@ -16,6 +16,7 @@ import { EuiPopoverTitle, EuiTextColor, } from '@elastic/eui'; +import { TraceAnalyticsMode } from 'public/components/trace_analytics/home'; import React, { useMemo, useState } from 'react'; import { FilterEditPopover } from './filter_edit_popover'; import { getFilterFields, getValidFilterFields } from './filter_helpers'; @@ -34,6 +35,7 @@ export interface FiltersProps { filters: FilterType[]; appConfigs?: FilterType[]; setFilters: (filters: FilterType[]) => void; + mode: TraceAnalyticsMode; } interface FiltersOwnProps extends FiltersProps { @@ -50,9 +52,9 @@ export function Filters(props: FiltersOwnProps) { props.setFilters(newFilters); }; - const validFilterFields = useMemo(() => getValidFilterFields(props.page), [props.page]); + const validFilterFields = useMemo(() => getValidFilterFields(props.mode, props.page), [props.page]); const filterFieldOptions = useMemo( - () => getFilterFields(props.page).map((field) => ({ label: field })), + () => getFilterFields(props.mode, props.page).map((field) => ({ label: field })), [props.page] ); diff --git a/public/components/trace_analytics/components/common/helper_functions.tsx b/public/components/trace_analytics/components/common/helper_functions.tsx index 04e48f6b15..f93222fb2e 100644 --- a/public/components/trace_analytics/components/common/helper_functions.tsx +++ b/public/components/trace_analytics/components/common/helper_functions.tsx @@ -13,8 +13,11 @@ import { DATA_PREPPER_INDEX_NAME, DATA_PREPPER_SERVICE_INDEX_NAME, TRACE_ANALYTICS_DOCUMENTATION_LINK, + JAEGER_INDEX_NAME, + JAEGER_SERVICE_INDEX_NAME, } from '../../../../../common/constants/trace_analytics'; import { uiSettingsService } from '../../../../../common/utils'; +import { TraceAnalyticsMode } from '../../home'; import { serviceMapColorPalette } from './color_palette'; import { FilterType } from './filters/filters'; import { ServiceObject } from './plots/service_map'; @@ -48,14 +51,14 @@ export function NoMatchMessage(props: { size: SpacerSize }) { ); } -export function MissingConfigurationMessage() { +export function MissingConfigurationMessage(props: {mode: TraceAnalyticsMode}) { return ( <> Trace Analytics not set up} body={ - {`The indices required for trace analytics (${DATA_PREPPER_INDEX_NAME} and ${DATA_PREPPER_SERVICE_INDEX_NAME}) do not exist or you do not have permission to access them.`} + {`The indices required for trace analytics (${props.mode === 'jaeger' ? JAEGER_INDEX_NAME : DATA_PREPPER_INDEX_NAME} and ${props.mode === 'jaeger' ? JAEGER_SERVICE_INDEX_NAME : DATA_PREPPER_SERVICE_INDEX_NAME}) do not exist or you do not have permission to access them.`} } actions={ @@ -73,6 +76,15 @@ export function MissingConfigurationMessage() { ); } +// Processes time (like 'now-5y') to microseconds for jaeger since this is how they store the start time. Otherwise leave it the same. +export function processTimeStamp(time: string, mode: TraceAnalyticsMode) { + if (mode === 'jaeger') { + const timeMoment = dateMath.parse(time)!; + return timeMoment.unix() * 1000000; + } + return time; +} + export function renderBenchmark(value: number) { if (typeof value !== 'number') return null; const benchmarkColor = value === 0 ? '#9ea8a9' : value > 0 ? '#c23f25' : '#3f7e23'; @@ -89,6 +101,16 @@ export function nanoToMilliSec(nano: number) { return nano / 1000000; } +export function microToMilliSec(micro: number) { + if (typeof micro !== 'number') return 0; + return micro / 1000; +} + +export function milliToMicroSec(ms: number) { + if (typeof ms !== 'number') return 0; + return ms * 1000; +} + export function milliToNanoSec(ms: number) { if (typeof ms !== 'number') return 0; return ms * 1000000; @@ -294,10 +316,11 @@ export const getPercentileFilter = ( }; export const filtersToDsl = ( + mode: TraceAnalyticsMode, filters: FilterType[], query: string, - startTime: string, - endTime: string, + startTime: any, + endTime: any, page?: string, appConfigs: FilterType[] = [] ) => { @@ -358,8 +381,19 @@ export const filtersToDsl = ( let filterQuery = {}; let field = filter.field; - if (field === 'latency') field = 'traceGroupFields.durationInNanos'; - else if (field === 'error') field = 'traceGroupFields.statusCode'; + if (field === 'latency'){ + if (mode === 'data_prepper') { + field = 'traceGroupFields.durationInNanos'; + } else if (mode === 'jaeger') { + field = 'duration'; + } + } else if (field === 'error') { + if (mode === 'data_prepper') { + field = 'traceGroupFields.statusCode'; + } else if (mode === 'jaeger') { + field = 'tag.error' + } + } let value; switch (filter.operator) { @@ -380,6 +414,10 @@ export const filtersToDsl = ( value = milliToNanoSec(value); } else if (field === 'traceGroupFields.statusCode') { value = value[0].label === 'true' ? '2' : '0'; + } else if (field === 'duration') { + value = milliToMicroSec(parseFloat(value)); + } else if (field === 'tag.error') { + value = value[0].label === 'true' ? true : false; } filterQuery = { @@ -398,6 +436,10 @@ export const filtersToDsl = ( if (range.lte) range.lte = milliToNanoSec(parseInt(range.lte || '')).toString(); if (range.gte) range.gte = milliToNanoSec(parseInt(range.gte || '')).toString(); } + if (field === 'duration') { + if (range.lte) range.lte = milliToMicroSec(parseInt(range.lte || '')).toString(); + if (range.gte) range.gte = milliToMicroSec(parseInt(range.gte || '')).toString(); + } filterQuery = { range: { [field]: range, diff --git a/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/error_rate_plt_.test.tsx.snap b/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/error_rate_plt_.test.tsx.snap index a996b25431..f08a4f459f 100644 --- a/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/error_rate_plt_.test.tsx.snap +++ b/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/error_rate_plt_.test.tsx.snap @@ -10,11 +10,21 @@ exports[`Error rate plot component renders error rate plot 1`] = ` } } > - - + + + + - + + + + diff --git a/public/components/trace_analytics/components/common/plots/error_rate_plt.tsx b/public/components/trace_analytics/components/common/plots/error_rate_plt.tsx index 7486245361..0ef040529e 100644 --- a/public/components/trace_analytics/components/common/plots/error_rate_plt.tsx +++ b/public/components/trace_analytics/components/common/plots/error_rate_plt.tsx @@ -3,9 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiHorizontalRule, EuiPanel } from '@elastic/eui'; +import { EuiButtonGroup, EuiHorizontalRule, EuiPanel, EuiFlexGroup, EuiSpacer, EuiButtonGroupOptionProps } from '@elastic/eui'; import moment from 'moment'; -import React, { useMemo } from 'react'; +import React, { useMemo, useState } from 'react'; import { Plt } from '../../../../visualizations/plotly/plot'; import { fixedIntervalToMilli, @@ -18,6 +18,9 @@ export function ErrorRatePlt(props: { items: { items: Plotly.Data[]; fixedInterval: string }; setStartTime: (startTime: string) => void; setEndTime: (endTime: string) => void; + setIdSelected: (mode: string) => void; + idSelected: string; + toggleButtons: EuiButtonGroupOptionProps[]; }) { const getLayout = () => ({ @@ -89,8 +92,17 @@ export function ErrorRatePlt(props: { return ( <> - - + + + props.setIdSelected(id as 'error_rate' | 'throughput')} + buttonSize="s" + color="text" + /> + + {props.items?.items?.length > 0 ? ( ) : ( diff --git a/public/components/trace_analytics/components/common/plots/throughput_plt.tsx b/public/components/trace_analytics/components/common/plots/throughput_plt.tsx index aba6bb2833..a7370bf0cc 100644 --- a/public/components/trace_analytics/components/common/plots/throughput_plt.tsx +++ b/public/components/trace_analytics/components/common/plots/throughput_plt.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiHorizontalRule, EuiPanel } from '@elastic/eui'; +import { EuiButtonGroup, EuiFlexGroup, EuiHorizontalRule, EuiPanel } from '@elastic/eui'; import moment from 'moment'; import React, { useMemo } from 'react'; import { Plt } from '../../../../visualizations/plotly/plot'; @@ -18,6 +18,9 @@ export function ThroughputPlt(props: { items: { items: Plotly.Data[]; fixedInterval: string }; setStartTime: (startTime: string) => void; setEndTime: (endTime: string) => void; + setIdSelected: (mode: string) => void; + idSelected: string; + toggleButtons: any[]; }) { const layout = useMemo( () => @@ -85,7 +88,16 @@ export function ThroughputPlt(props: { return ( <> + + props.setIdSelected(id as 'error_rate' | 'throughput')} + buttonSize="s" + color="text" + /> + {props.items?.items?.length > 0 ? ( diff --git a/public/components/trace_analytics/components/common/search_bar.tsx b/public/components/trace_analytics/components/common/search_bar.tsx index 0b0721981f..fa1bbc563a 100644 --- a/public/components/trace_analytics/components/common/search_bar.tsx +++ b/public/components/trace_analytics/components/common/search_bar.tsx @@ -98,6 +98,7 @@ export function SearchBar(props: SearchBarOwnProps) { filters={props.filters} setFilters={props.setFilters} appConfigs={props.appConfigs} + mode={props.mode} /> )} diff --git a/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap index ab6226b0ff..8d722ce6d4 100644 --- a/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap +++ b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/dashboard.test.tsx.snap @@ -46,10 +46,23 @@ exports[`Dashboard component renders dashboard 1`] = ` }, } } + dataPrepperIndicesExist={true} endTime="now" filters={Array []} http={[MockFunction]} - indicesExist={true} + mode="data_prepper" + modes={ + Array [ + Object { + "id": "jaeger", + "title": "Jaeger", + }, + Object { + "id": "data_prepper", + "title": "Data Prepper", + }, + ] + } page="dashboard" parentBreadcrumbs={ Array [ @@ -94,6 +107,128 @@ exports[`Dashboard component renders dashboard 1`] = ` Dashboard + + + Data Prepper + + } + className="eui-textTruncate" + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="s" + > +
+
+ + + +
+
+
+
- - -
- + + +
-
- -
- - -
- - Latency by trace group - - - (0) - -
-
-
-
-
- -
+ Latency by trace group + + + (0) + +
+ + +
+ + - - + +
+ + +
+ + +
+ + - -
-
- + ■ + + >= 95 percentile +
+ + + +
+ + +
+ +
+ + +
+ + +
+
+ +
- - + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } >
- - - + +
-
- +
- -
- - + +
+ + + +
+ + +
+
- - -
-
- - -
- - - No data matches the selected filter. Clear the filter and/or increase the time range to see more results. - - } - title={ -

- No matches -

- } + className="euiFlexItem euiFlexItem--flexGrow4" > -
- -

- No matches -

-
- - +
+ + +
+ + Service map + +
+
+
@@ -1206,614 +1438,524 @@ exports[`Dashboard component renders dashboard 1`] = ` className="euiSpacer euiSpacer--m" /> - -
+
- -
- No data matches the selected filter. Clear the filter and/or increase the time range to see more results. -
-
-
-
- - -
- - -
- - -
- - - -
- - -
- -
- - -
- - -
- - Service map - -
-
-
- -
- - -
- - - -
- + + +
- - - - - - + + + + - - - - - + + + + - - - -
-
-
- -
-
- -
+ + + +
+ + + +
+
+ - -
- -
- Focus on -
-
-
-
- -
- + +
+ Focus on +
+
+
+
+ +
- -
- - - - -
- + + +
- - - - -
-
+ + + + + + +
+
+
+
-
- - -
- -
- - + + +
+
+
+
+ +
+
- -
- - -
- - - No data matches the selected filter. Clear the filter and/or increase the time range to see more results. - - } - title={ -

- No matches -

- } - > -
- -

+
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

No matches

- - +
- - -
- - -
+ + + + - -
- No data matches the selected filter. Clear the filter and/or increase the time range to see more results. -
-
-
-
- - -
- - -
- - +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
-
- - -
- - -
- + +
+
+ +
-
- -
- + +
- -
- -
- - Trace error rate over time - + +
+ + Trace error rate over time + +
+
+ + +
+ + + +
+
+
-
-
- -
-
- +
- - No data matches the selected filter. Clear the filter and/or increase the time range to see more results. - - } - title={ -

- No matches -

- } + -
- -

+
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

No matches

- - +
- - -
- - -
+ + + + - -
- No data matches the selected filter. Clear the filter and/or increase the time range to see more results. -
-
-
-
- - -
- - -
- - -
- - -
- - -
- + + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+
+ +
+ + +
+ + +
+ + +
- -
- -
- - Traces over time - + +
+ + Traces over time + +
+
+ + +
+ + + +
+
+
-
-
- -
-
- - + -
- - - No data matches the selected filter. Clear the filter and/or increase the time range to see more results. - - } - title={ -

- No matches -

- } + + -
- -

+
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

No matches

- - +
- - -
- - -
+ + + + - -
- No data matches the selected filter. Clear the filter and/or increase the time range to see more results. -
-
-
-
- - -
- - -
- - -
- - -
- -
- -

- -
- +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + +
+ +
+ +

+ +
+ +
`; @@ -2110,10 +2318,23 @@ exports[`Dashboard component renders empty dashboard 1`] = ` }, } } + dataPrepperIndicesExist={true} endTime="now" filters={Array []} http={[MockFunction]} - indicesExist={false} + mode="data_prepper" + modes={ + Array [ + Object { + "id": "jaeger", + "title": "Jaeger", + }, + Object { + "id": "data_prepper", + "title": "Data Prepper", + }, + ] + } page="dashboard" parentBreadcrumbs={ Array [ @@ -2158,6 +2379,123 @@ exports[`Dashboard component renders empty dashboard 1`] = ` Dashboard

+ + + Data Prepper + + } + className="eui-textTruncate" + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="s" + > +
+
+ + + +
+
+
+
- - - Learn more - - } - body={ - - The indices required for trace analytics (otel-v1-apm-span-* and otel-v1-apm-service-map*) do not exist or you do not have permission to access them. - - } - title={ -

- Trace Analytics not set up -

- } +
+ -
- -

- Trace Analytics not set up -

-
- +
- - -
- - -
- -
+ - The indices required for trace analytics (otel-v1-apm-span-* and otel-v1-apm-service-map*) do not exist or you do not have permission to access them. -
-
-
-
- - - -
- - - -
+ + - - - - - - - - Learn more - - - - - - -
- - + +
+ + □ + + < 95 percentile +
+
+ + +
+ + +
+ + +
+ + + +
+
+ +
+ +
+ + +
+ + +
+
+ + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + + +
+ + +
+ +
+ + +
+ + +
+ + Service map + +
+
+
+ +
+ + +
+ + + +
+ + + + + + + + + + + + + + + +
+
+
+ +
+
+ +
+ +
+ +
+ Focus on +
+
+
+
+ +
+ + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+ +
+ +
+ + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+
+ + +
+ + +
+ +
+ +
+ + +
+ +
+ + +
+ + Trace error rate over time + +
+
+
+ +
+ + + +
+
+
+
+
+ +
+ + + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ + Traces over time + +
+
+
+ +
+ + + +
+
+
+
+
+ +
+
+ + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ +
+ + +`; + +exports[`Dashboard component renders empty jaeger dashboard 1`] = ` + + +

+ Dashboard +

+
+ + + Jaeger + + } + className="eui-textTruncate" + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="s" + > +
+
+ + + +
+
+
+
+ + + +
+ +
+ + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ +
+ + +
+ + +
+ + + + + +
+
+
+ + +
+ + + +
+ +
+ + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + withTitle={true} + > +
+
+ + + +
+
+
+
+
+
+ +
+ + + + Add filter + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + withTitle={true} + > +
+
+ + + +
+
+
+
+
+
+
+
+
+ + +
+ +
+ + +
+ + + +
+ +
+ + +
+ + Trace error rate over time + +
+
+
+ +
+ + + +
+ + + + + + + + + + +
+
+
+
+
+ +
+ + + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + + + +
+ +
+ +
+ + +
+ + Top 5 Service and Operation Errors + + + (0) + +
+
+
+
+
+
+
+ +
+ + +
+
+ + +
+ + + No data matches the selected filter. Clear the filter and/or increase the time range to see more results. + + } + title={ +

+ No matches +

+ } + > +
+ +

+ No matches +

+
+ + + +
+ + +
+ +
+ No data matches the selected filter. Clear the filter and/or increase the time range to see more results. +
+
+
+
+ + +
+ + +
+ + +
+ + + +
`; diff --git a/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/mode_picker.test.tsx.snap b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/mode_picker.test.tsx.snap new file mode 100644 index 0000000000..88d8ab540e --- /dev/null +++ b/public/components/trace_analytics/components/dashboard/__tests__/__snapshots__/mode_picker.test.tsx.snap @@ -0,0 +1,805 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Mode picker component renders mode picker 1`] = ` + + + Jaeger + + } + className="eui-textTruncate" + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="s" + > +
+
+ + + +
+
+
+
+`; + +exports[`Mode picker component renders mode picker 2`] = ` + + + Jaeger + + } + className="eui-textTruncate" + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={true} + ownFocus={true} + panelPaddingSize="s" + > +
+
+ + + +
+ + +
+
+