From 8bf3da538bb441a7cdd3e758d404a67472e24478 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Tue, 13 Jul 2021 18:10:47 +0530 Subject: [PATCH 1/6] fix: donut chart fixes --- .../components/donut/donut-builder.service.ts | 21 +++++++++++++++---- .../components/donut/donut.component.scss | 4 +--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/projects/observability/src/shared/components/donut/donut-builder.service.ts b/projects/observability/src/shared/components/donut/donut-builder.service.ts index 922cd5eb6..f0d4cd26d 100644 --- a/projects/observability/src/shared/components/donut/donut-builder.service.ts +++ b/projects/observability/src/shared/components/donut/donut-builder.service.ts @@ -39,6 +39,9 @@ export class DonutBuilderService extends D3VisualizationBuilderService< private static readonly DONUT_ARC_CLASS: string = 'donut-arc'; private static readonly DONUT_PADDING_PX: number = 10; + private static readonly MAX_DIAMETER_FOR_DONUT: number = 320; + private static readonly MAX_FONT_SIZE_FOR_TITLE: number = 15; + private static readonly MAX_FONT_SIZE_FOR_VALUE: number = 64; public constructor( d3: D3UtilService, @@ -69,11 +72,19 @@ export class DonutBuilderService extends D3VisualizationBuilderService< visualizationContainer .select(selector(DonutBuilderService.DONUT_VALUE_TITLE_CLASS)) - .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 2})`); + .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 2})`) + .style( + 'font-size', + Math.min(Math.floor(dimensions.donutInnerRadius / 8), DonutBuilderService.MAX_FONT_SIZE_FOR_TITLE) + ); visualizationContainer .select(selector(DonutBuilderService.DONUT_VALUE_CLASS)) - .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 4})`); + .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 4})`) + .style( + 'font-size', + Math.min(Math.floor(dimensions.donutInnerRadius / 2), DonutBuilderService.MAX_FONT_SIZE_FOR_VALUE) + ); } protected drawVisualization( @@ -127,12 +138,14 @@ export class DonutBuilderService extends D3VisualizationBuilderService< protected decorateDimensions(calculatedDimensions: ChartDimensions): DonutDimensions { let diameter = Math.min(calculatedDimensions.visualizationWidth, calculatedDimensions.visualizationHeight); - diameter -= DonutBuilderService.DONUT_PADDING_PX; - // Reduce visualization area to diameter calculatedDimensions.visualizationWidth = diameter; calculatedDimensions.visualizationHeight = diameter; + diameter -= DonutBuilderService.DONUT_PADDING_PX; + diameter = + diameter > DonutBuilderService.MAX_DIAMETER_FOR_DONUT ? DonutBuilderService.MAX_DIAMETER_FOR_DONUT : diameter; + return { ...calculatedDimensions, donutOuterRadius: diameter / 2, diff --git a/projects/observability/src/shared/components/donut/donut.component.scss b/projects/observability/src/shared/components/donut/donut.component.scss index ea3aa6b3f..01b3be92f 100644 --- a/projects/observability/src/shared/components/donut/donut.component.scss +++ b/projects/observability/src/shared/components/donut/donut.component.scss @@ -9,12 +9,10 @@ .donut-svg { .donut-value-title { - font-size: 15px; dominant-baseline: hanging; } .donut-value { - font-size: 64px; dominant-baseline: hanging; } } @@ -22,7 +20,7 @@ .donut-arc { stroke: white; - stroke-width: 2px; + stroke-width: 0.5px; } .donut-value-title { From 5599c6aa5eb0e254313d4001b3333bbd8feca35f Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Tue, 13 Jul 2021 18:11:33 +0530 Subject: [PATCH 2/6] Revert "fix: donut chart fixes" This reverts commit 8bf3da538bb441a7cdd3e758d404a67472e24478. --- .../components/donut/donut-builder.service.ts | 21 ++++--------------- .../components/donut/donut.component.scss | 4 +++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/projects/observability/src/shared/components/donut/donut-builder.service.ts b/projects/observability/src/shared/components/donut/donut-builder.service.ts index f0d4cd26d..922cd5eb6 100644 --- a/projects/observability/src/shared/components/donut/donut-builder.service.ts +++ b/projects/observability/src/shared/components/donut/donut-builder.service.ts @@ -39,9 +39,6 @@ export class DonutBuilderService extends D3VisualizationBuilderService< private static readonly DONUT_ARC_CLASS: string = 'donut-arc'; private static readonly DONUT_PADDING_PX: number = 10; - private static readonly MAX_DIAMETER_FOR_DONUT: number = 320; - private static readonly MAX_FONT_SIZE_FOR_TITLE: number = 15; - private static readonly MAX_FONT_SIZE_FOR_VALUE: number = 64; public constructor( d3: D3UtilService, @@ -72,19 +69,11 @@ export class DonutBuilderService extends D3VisualizationBuilderService< visualizationContainer .select(selector(DonutBuilderService.DONUT_VALUE_TITLE_CLASS)) - .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 2})`) - .style( - 'font-size', - Math.min(Math.floor(dimensions.donutInnerRadius / 8), DonutBuilderService.MAX_FONT_SIZE_FOR_TITLE) - ); + .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 2})`); visualizationContainer .select(selector(DonutBuilderService.DONUT_VALUE_CLASS)) - .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 4})`) - .style( - 'font-size', - Math.min(Math.floor(dimensions.donutInnerRadius / 2), DonutBuilderService.MAX_FONT_SIZE_FOR_VALUE) - ); + .attr('transform', `translate(0,-${dimensions.donutInnerRadius / 4})`); } protected drawVisualization( @@ -138,14 +127,12 @@ export class DonutBuilderService extends D3VisualizationBuilderService< protected decorateDimensions(calculatedDimensions: ChartDimensions): DonutDimensions { let diameter = Math.min(calculatedDimensions.visualizationWidth, calculatedDimensions.visualizationHeight); + diameter -= DonutBuilderService.DONUT_PADDING_PX; + // Reduce visualization area to diameter calculatedDimensions.visualizationWidth = diameter; calculatedDimensions.visualizationHeight = diameter; - diameter -= DonutBuilderService.DONUT_PADDING_PX; - diameter = - diameter > DonutBuilderService.MAX_DIAMETER_FOR_DONUT ? DonutBuilderService.MAX_DIAMETER_FOR_DONUT : diameter; - return { ...calculatedDimensions, donutOuterRadius: diameter / 2, diff --git a/projects/observability/src/shared/components/donut/donut.component.scss b/projects/observability/src/shared/components/donut/donut.component.scss index 01b3be92f..ea3aa6b3f 100644 --- a/projects/observability/src/shared/components/donut/donut.component.scss +++ b/projects/observability/src/shared/components/donut/donut.component.scss @@ -9,10 +9,12 @@ .donut-svg { .donut-value-title { + font-size: 15px; dominant-baseline: hanging; } .donut-value { + font-size: 64px; dominant-baseline: hanging; } } @@ -20,7 +22,7 @@ .donut-arc { stroke: white; - stroke-width: 0.5px; + stroke-width: 2px; } .donut-value-title { From 8955a2db3e7022b3a5b5c90ab1113523cb0457a3 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Mon, 19 Jul 2021 17:05:31 +0530 Subject: [PATCH 3/6] fix: topology error fix due to change in metric model --- .../overview/api-overview.dashboard.ts | 258 ++++++++++++------ .../overview/service-overview.dashboard.ts | 248 ++++++++++++----- 2 files changed, 360 insertions(+), 146 deletions(-) diff --git a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts index dfa20929a..84523fd3e 100644 --- a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts +++ b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts @@ -1,6 +1,14 @@ import { Color } from '@hypertrace/common'; import { DashboardDefaultConfiguration, MetricAggregationType } from '@hypertrace/distributed-tracing'; import { LegendPosition } from '../../../../shared/components/legend/legend.component'; +import { + defaultPrimaryEdgeMetricCategories, + defaultSecondaryEdgeMetricCategories +} from '../../../../shared/dashboard/widgets/topology/metric/edge-metric-category'; +import { + defaultPrimaryNodeMetricCategories, + defaultSecondaryNodeMetricCategories +} from '../../../../shared/dashboard/widgets/topology/metric/node-metric-category'; // tslint:disable: max-file-line-count export const apiOverviewDashboard: DashboardDefaultConfiguration = { @@ -486,88 +494,182 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { 'upstream-entities': ['SERVICE'], 'downstream-entities': ['API', 'BACKEND'], entity: 'API', - 'node-metrics': [ - { - type: 'percentile-latency-metric-aggregation', - 'display-name': 'P99 Latency' - }, - { - type: 'error-percentage-metric-aggregation', - aggregation: MetricAggregationType.Average, - 'display-name': 'Error Percentage' - }, - { - type: 'metric-aggregation', - metric: 'duration', - aggregation: MetricAggregationType.P50, - 'display-name': 'P50 Latency' - }, - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Errors' - }, - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Errors/s' - }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Calls' - }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Calls/s' - } - ], - 'edge-metrics': [ - { - type: 'percentile-latency-metric-aggregation', - 'display-name': 'P99 Latency' - }, - { - type: 'error-percentage-metric-aggregation', - aggregation: MetricAggregationType.Average, - 'display-name': 'Error Percentage' - }, - { - type: 'metric-aggregation', - metric: 'duration', - aggregation: MetricAggregationType.P50, - 'display-name': 'P50 Latency' + 'node-metrics': { + type: 'topology-metrics', + primary: { + type: 'topology-metric-with-category', + specification: { + type: 'percentile-latency-metric-aggregation', + 'display-name': 'P99 Latency' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[1] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[2] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[3] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[4] + } + ] }, - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Errors' + secondary: { + type: 'topology-metric-with-category', + specification: { + type: 'error-percentage-metric-aggregation', + aggregation: MetricAggregationType.Average, + 'display-name': 'Error %' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultSecondaryNodeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultSecondaryNodeMetricCategories[1] + } + ] }, - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Errors/s' + others: [ + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'duration', + aggregation: MetricAggregationType.P50, + 'display-name': 'P50 Latency' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Error Count' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Call Rate/sec' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Call Count' + } + } + ] + }, + 'edge-metrics': { + type: 'topology-metrics', + primary: { + type: 'topology-metric-with-category', + specification: { + type: 'percentile-latency-metric-aggregation', + 'display-name': 'P99 Latency' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[1] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[2] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[3] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[4] + } + ] }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Calls' + secondary: { + type: 'topology-metric-with-category', + specification: { + type: 'error-percentage-metric-aggregation', + aggregation: MetricAggregationType.Average, + 'display-name': 'Error %' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultSecondaryEdgeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultSecondaryEdgeMetricCategories[1] + } + ] }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Calls/s' - } - ] + others: [ + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'duration', + aggregation: MetricAggregationType.P50, + 'display-name': 'P50 Latency' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Error Count' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Call Rate/sec' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Call Count' + } + } + ] + } } } ] diff --git a/projects/observability/src/pages/apis/service-detail/overview/service-overview.dashboard.ts b/projects/observability/src/pages/apis/service-detail/overview/service-overview.dashboard.ts index c9378e7fe..c3cae70ce 100644 --- a/projects/observability/src/pages/apis/service-detail/overview/service-overview.dashboard.ts +++ b/projects/observability/src/pages/apis/service-detail/overview/service-overview.dashboard.ts @@ -1,6 +1,14 @@ import { Color } from '@hypertrace/common'; import { DashboardDefaultConfiguration, MetricAggregationType } from '@hypertrace/distributed-tracing'; import { LegendPosition } from '../../../../shared/components/legend/legend.component'; +import { + defaultPrimaryEdgeMetricCategories, + defaultSecondaryEdgeMetricCategories +} from '../../../../shared/dashboard/widgets/topology/metric/edge-metric-category'; +import { + defaultPrimaryNodeMetricCategories, + defaultSecondaryNodeMetricCategories +} from '../../../../shared/dashboard/widgets/topology/metric/node-metric-category'; import { ObservabilityEntityType } from '../../../../shared/graphql/model/schema/entity'; // tslint:disable: max-file-line-count @@ -529,78 +537,182 @@ export const serviceOverviewDashboard: DashboardDefaultConfiguration = { type: 'topology-data-source', 'downstream-entities': ['API', 'BACKEND'], entity: 'SERVICE', - 'node-metrics': [ - { - type: 'percentile-latency-metric-aggregation', - 'display-name': 'P99 Latency' - }, - { - type: 'metric-aggregation', - metric: 'duration', - aggregation: MetricAggregationType.P50, - 'display-name': 'P50 Latency' - }, - { - type: 'error-percentage-metric-aggregation', - aggregation: MetricAggregationType.Average, - 'display-name': 'Error %' - }, - - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Error Count' - }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Call Rate/sec' - }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Call Count' - } - ], - 'edge-metrics': [ - { - type: 'percentile-latency-metric-aggregation', - 'display-name': 'P99 Latency' - }, - { - type: 'metric-aggregation', - metric: 'duration', - aggregation: MetricAggregationType.P50, - 'display-name': 'P50 Latency' + 'node-metrics': { + type: 'topology-metrics', + primary: { + type: 'topology-metric-with-category', + specification: { + type: 'percentile-latency-metric-aggregation', + 'display-name': 'P99 Latency' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[1] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[2] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[3] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryNodeMetricCategories[4] + } + ] }, - { - type: 'error-percentage-metric-aggregation', - aggregation: MetricAggregationType.Average, - 'display-name': 'Error %' + secondary: { + type: 'topology-metric-with-category', + specification: { + type: 'error-percentage-metric-aggregation', + aggregation: MetricAggregationType.Average, + 'display-name': 'Error %' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultSecondaryNodeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultSecondaryNodeMetricCategories[1] + } + ] }, - - { - type: 'metric-aggregation', - metric: 'errorCount', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Error Count' + others: [ + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'duration', + aggregation: MetricAggregationType.P50, + 'display-name': 'P50 Latency' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Error Count' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Call Rate/sec' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Call Count' + } + } + ] + }, + 'edge-metrics': { + type: 'topology-metrics', + primary: { + type: 'topology-metric-with-category', + specification: { + type: 'percentile-latency-metric-aggregation', + 'display-name': 'P99 Latency' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[1] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[2] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[3] + }, + { + type: 'topology-metric-category', + ...defaultPrimaryEdgeMetricCategories[4] + } + ] }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Call Rate/sec' + secondary: { + type: 'topology-metric-with-category', + specification: { + type: 'error-percentage-metric-aggregation', + aggregation: MetricAggregationType.Average, + 'display-name': 'Error %' + }, + categories: [ + { + type: 'topology-metric-category', + ...defaultSecondaryEdgeMetricCategories[0] + }, + { + type: 'topology-metric-category', + ...defaultSecondaryEdgeMetricCategories[1] + } + ] }, - { - type: 'metric-aggregation', - metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Call Count' - } - ] + others: [ + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'duration', + aggregation: MetricAggregationType.P50, + 'display-name': 'P50 Latency' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Error Count' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Call Rate/sec' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'numCalls', + aggregation: MetricAggregationType.Sum, + 'display-name': 'Call Count' + } + } + ] + } } } ] From 66128d4354eaaeaebf88eb776eff04d7602858e8 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Mon, 19 Jul 2021 17:14:01 +0530 Subject: [PATCH 4/6] fix: adding public api --- projects/observability/src/public-api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/observability/src/public-api.ts b/projects/observability/src/public-api.ts index 122e27979..7a7908208 100644 --- a/projects/observability/src/public-api.ts +++ b/projects/observability/src/public-api.ts @@ -157,6 +157,10 @@ export * from './shared/components/topology/renderers/tooltip/topology-tooltip-r export * from './shared/components/topology/topology.component'; export * from './shared/components/topology/topology.module'; +// Topology Metric +export * from './shared/dashboard/widgets/topology/metric/edge-metric-category'; +export * from './shared/dashboard/widgets/topology/metric/node-metric-category'; + // API Trace Waterfall Data Source export * from './shared/dashboard/data/graphql/waterfall/api-trace-waterfall-data-source.model'; From 36c034060d01e2aba302a1905c54ab095e56e541 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Mon, 19 Jul 2021 17:30:35 +0530 Subject: [PATCH 5/6] fix: node and edge metric for api overview --- .../overview/api-overview.dashboard.ts | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts index 84523fd3e..b91e3324b 100644 --- a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts +++ b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts @@ -559,7 +559,16 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { type: 'metric-aggregation', metric: 'errorCount', aggregation: MetricAggregationType.Sum, - 'display-name': 'Error Count' + 'display-name': 'Errors' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Errors/s' } }, { @@ -647,7 +656,16 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { type: 'metric-aggregation', metric: 'errorCount', aggregation: MetricAggregationType.Sum, - 'display-name': 'Error Count' + 'display-name': 'Errors' + } + }, + { + type: 'topology-metric-with-category', + specification: { + type: 'metric-aggregation', + metric: 'errorCount', + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Errors/s' } }, { From 1403cb52b13923faab27ceaad6071abede7432a9 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Mon, 19 Jul 2021 17:33:35 +0530 Subject: [PATCH 6/6] fix: node and edge metric for api overview --- .../overview/api-overview.dashboard.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts index b91e3324b..14e8d755e 100644 --- a/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts +++ b/projects/observability/src/pages/apis/api-detail/overview/api-overview.dashboard.ts @@ -576,8 +576,8 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { specification: { type: 'metric-aggregation', metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Call Rate/sec' + aggregation: MetricAggregationType.Sum, + 'display-name': 'Calls' } }, { @@ -585,8 +585,8 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { specification: { type: 'metric-aggregation', metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Call Count' + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Calls/s' } } ] @@ -673,8 +673,8 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { specification: { type: 'metric-aggregation', metric: 'numCalls', - aggregation: MetricAggregationType.AvgrateSecond, - 'display-name': 'Call Rate/sec' + aggregation: MetricAggregationType.Sum, + 'display-name': 'Calls' } }, { @@ -682,8 +682,8 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = { specification: { type: 'metric-aggregation', metric: 'numCalls', - aggregation: MetricAggregationType.Sum, - 'display-name': 'Call Count' + aggregation: MetricAggregationType.AvgrateSecond, + 'display-name': 'Calls/s' } } ]