- Latency (ms)
+ Duration (ms)
@@ -2806,7 +2806,7 @@ exports[`Traces table component renders traces table 1`] = `
key="_data_column_latency_0_2"
mobileOptions={
Object {
- "header": "Latency (ms)",
+ "header": "Duration (ms)",
"render": undefined,
}
}
@@ -2825,7 +2825,7 @@ exports[`Traces table component renders traces table 1`] = `
- Latency (ms)
+ Duration (ms)
-
- Traces
-
>
diff --git a/public/components/trace_analytics/components/traces/traces_table.tsx b/public/components/trace_analytics/components/traces/traces_table.tsx
index 03fa6c68a..cd6699961 100644
--- a/public/components/trace_analytics/components/traces/traces_table.tsx
+++ b/public/components/trace_analytics/components/traces/traces_table.tsx
@@ -110,7 +110,7 @@ export function TracesTable(props: TracesTableProps) {
},
{
field: 'latency',
- name: 'Latency (ms)',
+ name: 'Duration (ms)',
align: 'right',
sortable: true,
truncateText: true,
diff --git a/public/components/trace_analytics/home.tsx b/public/components/trace_analytics/home.tsx
index 7d4569949..3fa8dfc11 100644
--- a/public/components/trace_analytics/home.tsx
+++ b/public/components/trace_analytics/home.tsx
@@ -101,17 +101,6 @@ export const Home = (props: HomeProps) => {
}
}, [jaegerIndicesExist, dataPrepperIndicesExist]);
- const dashboardBreadcrumbs = [
- {
- text: 'Trace analytics',
- href: '#/',
- },
- {
- text: 'Dashboard',
- href: '#/',
- },
- ];
-
const serviceBreadcrumbs = [
{
text: 'Trace analytics',
@@ -175,21 +164,6 @@ export const Home = (props: HomeProps) => {
toastLifeTimeMs={6000}
/>
- (
-
-
-
- )}
- />
{
/>
(
{
childBreadcrumbs={serviceBreadcrumbs}
nameColumnAction={nameColumnAction}
traceColumnAction={traceColumnAction}
+ toasts={toasts}
{...commonProps}
/>
diff --git a/public/components/trace_analytics/requests/dashboard_request_handler.ts b/public/components/trace_analytics/requests/dashboard_request_handler.ts
index d25ad03fd..d9316bca0 100644
--- a/public/components/trace_analytics/requests/dashboard_request_handler.ts
+++ b/public/components/trace_analytics/requests/dashboard_request_handler.ts
@@ -28,6 +28,7 @@ export const handleDashboardRequest = async (
items,
setItems,
mode,
+ setShowTimeoutToast,
setPercentileMap?
) => {
// latency_variance should only be affected by timefilter
@@ -49,7 +50,7 @@ export const handleDashboardRequest = async (
.catch((error) => console.error(error));
if (setPercentileMap) setPercentileMap(latencyVariances);
- const latencyTrends = await handleDslRequest(http, latencyTrendDSL, getLatencyTrendQuery(), mode)
+ const latencyTrends = await handleDslRequest(http, latencyTrendDSL, getLatencyTrendQuery(), mode, setShowTimeoutToast)
.then((response) => {
const map: any = {};
response.aggregations.trace_group_name.buckets.map((bucket) => {
@@ -104,7 +105,7 @@ export const handleDashboardRequest = async (
})
.catch((error) => console.error(error));
- await handleDslRequest(http, DSL, getDashboardQuery(), mode)
+ await handleDslRequest(http, DSL, getDashboardQuery(), mode, setShowTimeoutToast)
.then((response) => {
return Promise.all(
response.aggregations.trace_group_name.buckets.map((bucket) => {
@@ -137,7 +138,7 @@ export const handleJaegerDashboardRequest = async (
setShowTimeoutToast,
setPercentileMap?
) => {
- const latencyTrends = await handleDslRequest(http, latencyTrendDSL, getJaegerLatencyTrendQuery(), mode, true, setShowTimeoutToast)
+ const latencyTrends = await handleDslRequest(http, latencyTrendDSL, getJaegerLatencyTrendQuery(), mode, setShowTimeoutToast)
.then((response) => {
const map: any = {};
response.aggregations.trace_group_name.buckets.map((bucket) => {
@@ -194,7 +195,7 @@ export const handleJaegerDashboardRequest = async (
console.error(error);
});
- await handleDslRequest(http, DSL, getJaegerDashboardQuery(), mode, true, setShowTimeoutToast)
+ await handleDslRequest(http, DSL, getJaegerDashboardQuery(), mode, setShowTimeoutToast)
.then((response) => {
return Promise.all(
response.aggregations.trace_group_name.buckets.map((bucket) => {
@@ -248,7 +249,7 @@ export const handleJaegerErrorDashboardRequest = async (
setShowTimeoutToast,
setPercentileMap?
) => {
- const errorTrends = await handleDslRequest(http, latencyTrendDSL, getJaegerErrorTrendQuery(), mode, true, setShowTimeoutToast)
+ const errorTrends = await handleDslRequest(http, latencyTrendDSL, getJaegerErrorTrendQuery(), mode, setShowTimeoutToast)
.then((response) => {
const map: any = {};
response.aggregations.trace_group_name.buckets.map((bucket) => {
@@ -303,7 +304,7 @@ export const handleJaegerErrorDashboardRequest = async (
})
.catch((error) => console.error(error));
- await handleDslRequest(http, DSL, getJaegerErrorDashboardQuery(), mode, true, setShowTimeoutToast)
+ await handleDslRequest(http, DSL, getJaegerErrorDashboardQuery(), mode, setShowTimeoutToast)
.then((response) => {
return Promise.all(
response.aggregations.trace_group_name.buckets.map((bucket) => {
diff --git a/public/components/trace_analytics/requests/request_handler.ts b/public/components/trace_analytics/requests/request_handler.ts
index 2d3191a02..bb687183d 100644
--- a/public/components/trace_analytics/requests/request_handler.ts
+++ b/public/components/trace_analytics/requests/request_handler.ts
@@ -18,7 +18,6 @@ export async function handleDslRequest(
DSL: any,
bodyQuery: any,
mode: TraceAnalyticsMode,
- timeout?: boolean,
setShowTimeoutToast?: () => void
) {
if (DSL?.query) {
@@ -33,8 +32,8 @@ export async function handleDslRequest(
if (!bodyQuery.index) {
body = { ...bodyQuery, index: mode === 'jaeger' ? JAEGER_INDEX_NAME : DATA_PREPPER_INDEX_NAME };
}
- if (timeout) {
- const id = setTimeout(() => setShowTimeoutToast!(), 30000);
+ if (setShowTimeoutToast) {
+ const id = setTimeout(() => setShowTimeoutToast(), 25000); // 25 seconds
try {
return await http.post(TRACE_ANALYTICS_DSL_ROUTE, {
@@ -45,14 +44,15 @@ export async function handleDslRequest(
} finally {
clearTimeout(id);
}
- }
+ } else {
- try {
- return await http.post(TRACE_ANALYTICS_DSL_ROUTE, {
- body: JSON.stringify(body),
- });
- } catch (error_1) {
- console.error(error_1);
+ try {
+ return await http.post(TRACE_ANALYTICS_DSL_ROUTE, {
+ body: JSON.stringify(body),
+ });
+ } catch (error_1) {
+ console.error(error_1);
+ }
}
}
diff --git a/public/components/trace_analytics/trace_side_nav.tsx b/public/components/trace_analytics/trace_side_nav.tsx
index 77cb44596..de1a346d4 100644
--- a/public/components/trace_analytics/trace_side_nav.tsx
+++ b/public/components/trace_analytics/trace_side_nav.tsx
@@ -4,7 +4,6 @@
*/
import {
- EuiButton,
EuiFlexGroup,
EuiFlexItem,
EuiPage,
@@ -12,22 +11,17 @@ import {
EuiPageSideBar,
EuiSideNav,
EuiSideNavItemType,
- EuiSwitch,
} from '@elastic/eui';
import React from 'react';
export function TraceSideBar(props: { children: React.ReactNode }) {
function setIsSelected(items: Array>, hash: string): boolean {
- if (hash === '#/') {
- items[0].isSelected = true;
- return true;
- }
if (hash === '#/traces') {
- items[0].items[0].isSelected = true;
+ items[0].items[1].isSelected = true;
return true;
}
- if (hash === '#/services') {
- items[0].items[1].isSelected = true;
+ if (hash === '#/services' || hash === '#/') {
+ items[0].items[0].isSelected = true;
return true;
}
}
@@ -39,14 +33,14 @@ export function TraceSideBar(props: { children: React.ReactNode }) {
href: '#/',
items: [
{
- name: 'Traces',
+ name: 'Services',
id: 1.1,
- href: '#/traces',
+ href: '#/services',
},
{
- name: 'Services',
+ name: 'Traces',
id: 1.2,
- href: '#/services',
+ href: '#/traces',
},
],
},
diff --git a/test/constants.ts b/test/constants.ts
index e5c2e03a2..f332a905b 100644
--- a/test/constants.ts
+++ b/test/constants.ts
@@ -205,7 +205,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 1,
label: 'order',
size: 15,
- title: 'order\n\nAverage latency: 90.1ms\nError rate: 4.17%\nThroughput: 48',
+ title: 'order\n\nAverage duration: 90.1ms\nError rate: 4.17%\nRequest rate: 48',
borderWidth: 0,
color: 'rgba(158, 134, 192, 1)',
font: {
@@ -216,7 +216,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 2,
label: 'analytics-service',
size: 15,
- title: 'analytics-service\n\nAverage latency: 12.99ms\nError rate: 0%\nThroughput: 37',
+ title: 'analytics-service\n\nAverage duration: 12.99ms\nError rate: 0%\nRequest rate: 37',
borderWidth: 0,
color: 'rgba(210, 202, 224, 1)',
font: {
@@ -227,7 +227,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 3,
label: 'database',
size: 15,
- title: 'database\n\nAverage latency: 49.54ms\nError rate: 3.77%\nThroughput: 53',
+ title: 'database\n\nAverage duration: 49.54ms\nError rate: 3.77%\nRequest rate: 53',
borderWidth: 0,
color: 'rgba(187, 171, 212, 1)',
font: {
@@ -238,7 +238,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 4,
label: 'frontend-client',
size: 15,
- title: 'frontend-client\n\nAverage latency: 207.71ms\nError rate: 7.41%\nThroughput: 27',
+ title: 'frontend-client\n\nAverage duration: 207.71ms\nError rate: 7.41%\nRequest rate: 27',
borderWidth: 0,
color: 'rgba(78, 42, 122, 1)',
font: {
@@ -249,7 +249,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 5,
label: 'inventory',
size: 15,
- title: 'inventory\n\nAverage latency: 183.52ms\nError rate: 3.23%\nThroughput: 31',
+ title: 'inventory\n\nAverage duration: 183.52ms\nError rate: 3.23%\nRequest rate: 31',
borderWidth: 0,
color: 'rgba(95, 61, 138, 1)',
font: {
@@ -260,7 +260,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 6,
label: 'authentication',
size: 15,
- title: 'authentication\n\nAverage latency: 139.09ms\nError rate: 8.33%\nThroughput: 12',
+ title: 'authentication\n\nAverage duration: 139.09ms\nError rate: 8.33%\nRequest rate: 12',
borderWidth: 0,
color: 'rgba(125, 95, 166, 1)',
font: {
@@ -271,7 +271,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 7,
label: 'payment',
size: 15,
- title: 'payment\n\nAverage latency: 134.36ms\nError rate: 9.09%\nThroughput: 11',
+ title: 'payment\n\nAverage duration: 134.36ms\nError rate: 9.09%\nRequest rate: 11',
borderWidth: 0,
color: 'rgba(129, 99, 169, 1)',
font: {
@@ -282,7 +282,7 @@ export const TEST_SERVICE_MAP_GRAPH = {
id: 8,
label: 'recommendation',
size: 15,
- title: 'recommendation\n\nAverage latency: 176.97ms\nError rate: 6.25%\nThroughput: 16',
+ title: 'recommendation\n\nAverage duration: 176.97ms\nError rate: 6.25%\nRequest rate: 16',
borderWidth: 0,
color: 'rgba(100, 66, 143, 1)',
font: {