Skip to content

fix: topology error fix due to change in metrics model #1005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 19, 2021
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -486,88 +494,200 @@ 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': 'Errors'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'errorCount',
aggregation: MetricAggregationType.AvgrateSecond,
'display-name': 'Errors/s'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'numCalls',
aggregation: MetricAggregationType.Sum,
'display-name': 'Calls'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'numCalls',
aggregation: MetricAggregationType.AvgrateSecond,
'display-name': 'Calls/s'
}
}
]
},
'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': 'Errors'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'errorCount',
aggregation: MetricAggregationType.AvgrateSecond,
'display-name': 'Errors/s'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'numCalls',
aggregation: MetricAggregationType.Sum,
'display-name': 'Calls'
}
},
{
type: 'topology-metric-with-category',
specification: {
type: 'metric-aggregation',
metric: 'numCalls',
aggregation: MetricAggregationType.AvgrateSecond,
'display-name': 'Calls/s'
}
}
]
}
}
}
]
Expand Down
Loading