@oneuptime/common 10.0.43 → 10.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/Workflow.ts +29 -0
- package/Server/API/StatusPageAPI.ts +48 -0
- package/Server/EnvironmentConfig.ts +5 -8
- package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064920-MigrationName.ts +22 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +2 -0
- package/Server/Services/AlertService.ts +45 -0
- package/Server/Services/IncidentService.ts +81 -13
- package/Server/Services/LogAggregationService.ts +1 -0
- package/Server/Services/WorkflowService.ts +28 -1
- package/Server/Types/Workflow/Components/Webhook.ts +28 -5
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +29 -13
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +163 -26
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +92 -0
- package/Server/Utils/Profiling.ts +101 -0
- package/Server/Utils/VM/VMRunner.ts +88 -0
- package/Types/Dashboard/DashboardTemplates.ts +1149 -0
- package/Types/Exception/ExceptionMetricType.ts +15 -0
- package/Types/IsolatedVM/ReturnResult.ts +3 -0
- package/Types/Metrics/MetricDashboardMetricType.ts +28 -0
- package/Types/Metrics/MetricsQuery.ts +2 -1
- package/Types/Monitor/CustomCodeMonitor/CapturedMetric.ts +7 -0
- package/Types/Monitor/CustomCodeMonitor/CustomCodeMonitorResponse.ts +2 -0
- package/Types/Monitor/UptimeBarTooltipIncident.ts +21 -0
- package/Types/Profile/ProfileMetricType.ts +16 -0
- package/Types/Span/SpanMetricType.ts +17 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +40 -33
- package/UI/Components/Charts/Bar/BarChart.tsx +37 -30
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +196 -51
- package/UI/Components/Charts/ChartGroup/NoDataMessage.tsx +13 -0
- package/UI/Components/Charts/Line/LineChart.tsx +39 -32
- package/UI/Components/Forms/BasicForm.tsx +1 -1
- package/UI/Components/Graphs/DayUptimeGraph.tsx +88 -35
- package/UI/Components/Graphs/UptimeBarTooltip.tsx +547 -0
- package/UI/Components/MonitorGraphs/Uptime.tsx +7 -0
- package/UI/Components/MonitorGraphs/UptimeBarDayModal.tsx +225 -0
- package/UI/Components/RadioButtons/GroupRadioButtons.tsx +1 -0
- package/UI/Components/Tooltip/Tooltip.tsx +29 -4
- package/UI/Components/Workflow/ComponentSettingsModal.tsx +2 -0
- package/UI/Components/Workflow/DocumentationViewer.tsx +5 -0
- package/UI/Components/Workflow/Workflow.tsx +2 -0
- package/Utils/Alerts/AlertMetricType.ts +98 -0
- package/Utils/Incident/IncidentMetricType.ts +130 -0
- package/build/dist/Models/DatabaseModels/Workflow.js +30 -0
- package/build/dist/Models/DatabaseModels/Workflow.js.map +1 -1
- package/build/dist/Server/API/StatusPageAPI.js +42 -0
- package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +2 -2
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064920-MigrationName.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064920-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +2 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +34 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +52 -9
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/WorkflowService.js +25 -0
- package/build/dist/Server/Services/WorkflowService.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Webhook.js +23 -5
- package/build/dist/Server/Types/Workflow/Components/Webhook.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +21 -7
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +120 -21
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +68 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Profiling.js +80 -0
- package/build/dist/Server/Utils/Profiling.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMRunner.js +68 -0
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardTemplates.js +1095 -0
- package/build/dist/Types/Dashboard/DashboardTemplates.js.map +1 -1
- package/build/dist/Types/Exception/ExceptionMetricType.js +16 -0
- package/build/dist/Types/Exception/ExceptionMetricType.js.map +1 -0
- package/build/dist/Types/Metrics/MetricDashboardMetricType.js +26 -0
- package/build/dist/Types/Metrics/MetricDashboardMetricType.js.map +1 -0
- package/build/dist/Types/Monitor/CustomCodeMonitor/CapturedMetric.js +2 -0
- package/build/dist/Types/Monitor/CustomCodeMonitor/CapturedMetric.js.map +1 -0
- package/build/dist/Types/Monitor/UptimeBarTooltipIncident.js +2 -0
- package/build/dist/Types/Monitor/UptimeBarTooltipIncident.js.map +1 -0
- package/build/dist/Types/Profile/ProfileMetricType.js +17 -0
- package/build/dist/Types/Profile/ProfileMetricType.js.map +1 -0
- package/build/dist/Types/Span/SpanMetricType.js +18 -0
- package/build/dist/Types/Span/SpanMetricType.js.map +1 -0
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +21 -16
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +20 -15
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +73 -15
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/NoDataMessage.js +7 -0
- package/build/dist/UI/Components/Charts/ChartGroup/NoDataMessage.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +20 -15
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Graphs/DayUptimeGraph.js +46 -20
- package/build/dist/UI/Components/Graphs/DayUptimeGraph.js.map +1 -1
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js +303 -0
- package/build/dist/UI/Components/Graphs/UptimeBarTooltip.js.map +1 -0
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js +1 -1
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js.map +1 -1
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js +118 -0
- package/build/dist/UI/Components/MonitorGraphs/UptimeBarDayModal.js.map +1 -0
- package/build/dist/UI/Components/RadioButtons/GroupRadioButtons.js +1 -1
- package/build/dist/UI/Components/RadioButtons/GroupRadioButtons.js.map +1 -1
- package/build/dist/UI/Components/Tooltip/Tooltip.js +13 -3
- package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js +1 -1
- package/build/dist/UI/Components/Workflow/ComponentSettingsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js +1 -0
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js +1 -1
- package/build/dist/UI/Components/Workflow/Workflow.js.map +1 -1
- package/build/dist/Utils/Alerts/AlertMetricType.js +84 -0
- package/build/dist/Utils/Alerts/AlertMetricType.js.map +1 -0
- package/build/dist/Utils/Incident/IncidentMetricType.js +114 -0
- package/build/dist/Utils/Incident/IncidentMetricType.js.map +1 -0
- package/package.json +3 -2
|
@@ -7,12 +7,20 @@ import IconProp from "../Icon/IconProp";
|
|
|
7
7
|
import MetricsAggregationType from "../Metrics/MetricsAggregationType";
|
|
8
8
|
import IncidentMetricType from "../Incident/IncidentMetricType";
|
|
9
9
|
import MonitorMetricType from "../Monitor/MonitorMetricType";
|
|
10
|
+
import SpanMetricType from "../Span/SpanMetricType";
|
|
11
|
+
import ExceptionMetricType from "../Exception/ExceptionMetricType";
|
|
12
|
+
import ProfileMetricType from "../Profile/ProfileMetricType";
|
|
13
|
+
import MetricDashboardMetricType from "../Metrics/MetricDashboardMetricType";
|
|
10
14
|
export var DashboardTemplateType;
|
|
11
15
|
(function (DashboardTemplateType) {
|
|
12
16
|
DashboardTemplateType["Blank"] = "Blank";
|
|
13
17
|
DashboardTemplateType["Monitor"] = "Monitor";
|
|
14
18
|
DashboardTemplateType["Incident"] = "Incident";
|
|
15
19
|
DashboardTemplateType["Kubernetes"] = "Kubernetes";
|
|
20
|
+
DashboardTemplateType["Metrics"] = "Metrics";
|
|
21
|
+
DashboardTemplateType["Trace"] = "Trace";
|
|
22
|
+
DashboardTemplateType["Exception"] = "Exception";
|
|
23
|
+
DashboardTemplateType["Profiles"] = "Profiles";
|
|
16
24
|
})(DashboardTemplateType || (DashboardTemplateType = {}));
|
|
17
25
|
export const DashboardTemplates = [
|
|
18
26
|
{
|
|
@@ -39,6 +47,30 @@ export const DashboardTemplates = [
|
|
|
39
47
|
description: "CPU/memory gauges, pod and node metrics, network I/O, restart trends, and cluster logs.",
|
|
40
48
|
icon: IconProp.Kubernetes,
|
|
41
49
|
},
|
|
50
|
+
{
|
|
51
|
+
type: DashboardTemplateType.Metrics,
|
|
52
|
+
name: "Metrics Dashboard",
|
|
53
|
+
description: "HTTP request rates, latency percentiles, error rates, system resource usage, and custom application metrics.",
|
|
54
|
+
icon: IconProp.ChartBar,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: DashboardTemplateType.Trace,
|
|
58
|
+
name: "Trace Dashboard",
|
|
59
|
+
description: "Span throughput, latency percentiles, error rates, service health, status breakdown, and recent traces.",
|
|
60
|
+
icon: IconProp.Activity,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: DashboardTemplateType.Exception,
|
|
64
|
+
name: "Exception Dashboard",
|
|
65
|
+
description: "Exception counts, error rates, top exception types, resolution status, affected services, and logs.",
|
|
66
|
+
icon: IconProp.Bug,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: DashboardTemplateType.Profiles,
|
|
70
|
+
name: "Profiles Dashboard",
|
|
71
|
+
description: "CPU profiles, memory allocations, heap usage, thread counts, top functions by CPU time, and flamegraph data.",
|
|
72
|
+
icon: IconProp.Fire,
|
|
73
|
+
},
|
|
42
74
|
];
|
|
43
75
|
function buildMetricQueryConfig(config) {
|
|
44
76
|
var _a, _b;
|
|
@@ -838,6 +870,1061 @@ function createKubernetesDashboardConfig() {
|
|
|
838
870
|
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 16),
|
|
839
871
|
};
|
|
840
872
|
}
|
|
873
|
+
function createMetricsDashboardConfig() {
|
|
874
|
+
const components = [
|
|
875
|
+
// Row 0: Title
|
|
876
|
+
createTextComponent({
|
|
877
|
+
text: "Metrics Dashboard",
|
|
878
|
+
top: 0,
|
|
879
|
+
left: 0,
|
|
880
|
+
width: 12,
|
|
881
|
+
height: 1,
|
|
882
|
+
isBold: true,
|
|
883
|
+
}),
|
|
884
|
+
// Row 1: Key HTTP metrics
|
|
885
|
+
createValueComponent({
|
|
886
|
+
title: "Request Rate",
|
|
887
|
+
top: 1,
|
|
888
|
+
left: 0,
|
|
889
|
+
width: 3,
|
|
890
|
+
metricConfig: {
|
|
891
|
+
metricName: MetricDashboardMetricType.HttpRequestCount,
|
|
892
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
893
|
+
legendUnit: "req/s",
|
|
894
|
+
},
|
|
895
|
+
}),
|
|
896
|
+
createValueComponent({
|
|
897
|
+
title: "Avg Latency",
|
|
898
|
+
top: 1,
|
|
899
|
+
left: 3,
|
|
900
|
+
width: 3,
|
|
901
|
+
metricConfig: {
|
|
902
|
+
metricName: MetricDashboardMetricType.HttpRequestDuration,
|
|
903
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
904
|
+
legendUnit: "ms",
|
|
905
|
+
},
|
|
906
|
+
}),
|
|
907
|
+
createValueComponent({
|
|
908
|
+
title: "Error Rate",
|
|
909
|
+
top: 1,
|
|
910
|
+
left: 6,
|
|
911
|
+
width: 3,
|
|
912
|
+
metricConfig: {
|
|
913
|
+
metricName: MetricDashboardMetricType.HttpRequestErrorRate,
|
|
914
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
915
|
+
legendUnit: "%",
|
|
916
|
+
},
|
|
917
|
+
}),
|
|
918
|
+
createValueComponent({
|
|
919
|
+
title: "Active Requests",
|
|
920
|
+
top: 1,
|
|
921
|
+
left: 9,
|
|
922
|
+
width: 3,
|
|
923
|
+
metricConfig: {
|
|
924
|
+
metricName: MetricDashboardMetricType.HttpActiveRequests,
|
|
925
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
926
|
+
},
|
|
927
|
+
}),
|
|
928
|
+
// Row 2-4: HTTP request charts
|
|
929
|
+
createChartComponent({
|
|
930
|
+
title: "Request Rate Over Time",
|
|
931
|
+
chartType: DashboardChartType.Bar,
|
|
932
|
+
top: 2,
|
|
933
|
+
left: 0,
|
|
934
|
+
width: 6,
|
|
935
|
+
height: 3,
|
|
936
|
+
metricConfig: {
|
|
937
|
+
metricName: MetricDashboardMetricType.HttpRequestCount,
|
|
938
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
939
|
+
legend: "Requests",
|
|
940
|
+
legendUnit: "req/s",
|
|
941
|
+
},
|
|
942
|
+
}),
|
|
943
|
+
createChartComponent({
|
|
944
|
+
title: "Request Latency Over Time",
|
|
945
|
+
chartType: DashboardChartType.Line,
|
|
946
|
+
top: 2,
|
|
947
|
+
left: 6,
|
|
948
|
+
width: 6,
|
|
949
|
+
height: 3,
|
|
950
|
+
metricConfig: {
|
|
951
|
+
metricName: MetricDashboardMetricType.HttpRequestDuration,
|
|
952
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
953
|
+
legend: "Avg Latency",
|
|
954
|
+
legendUnit: "ms",
|
|
955
|
+
},
|
|
956
|
+
}),
|
|
957
|
+
// Row 5: Section header
|
|
958
|
+
createTextComponent({
|
|
959
|
+
text: "Error Analysis",
|
|
960
|
+
top: 5,
|
|
961
|
+
left: 0,
|
|
962
|
+
width: 12,
|
|
963
|
+
height: 1,
|
|
964
|
+
isBold: true,
|
|
965
|
+
}),
|
|
966
|
+
// Row 6-8: Error charts and response sizes
|
|
967
|
+
createChartComponent({
|
|
968
|
+
title: "Error Rate Over Time",
|
|
969
|
+
chartType: DashboardChartType.Area,
|
|
970
|
+
top: 6,
|
|
971
|
+
left: 0,
|
|
972
|
+
width: 6,
|
|
973
|
+
height: 3,
|
|
974
|
+
metricConfig: {
|
|
975
|
+
metricName: MetricDashboardMetricType.HttpRequestErrorRate,
|
|
976
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
977
|
+
legend: "Error Rate",
|
|
978
|
+
legendUnit: "%",
|
|
979
|
+
},
|
|
980
|
+
}),
|
|
981
|
+
createChartComponent({
|
|
982
|
+
title: "Response Size Over Time",
|
|
983
|
+
chartType: DashboardChartType.Line,
|
|
984
|
+
top: 6,
|
|
985
|
+
left: 6,
|
|
986
|
+
width: 6,
|
|
987
|
+
height: 3,
|
|
988
|
+
metricConfig: {
|
|
989
|
+
metricName: MetricDashboardMetricType.HttpResponseSize,
|
|
990
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
991
|
+
legend: "Response Size",
|
|
992
|
+
legendUnit: "bytes",
|
|
993
|
+
},
|
|
994
|
+
}),
|
|
995
|
+
// Row 9: Section header
|
|
996
|
+
createTextComponent({
|
|
997
|
+
text: "System Resources",
|
|
998
|
+
top: 9,
|
|
999
|
+
left: 0,
|
|
1000
|
+
width: 12,
|
|
1001
|
+
height: 1,
|
|
1002
|
+
isBold: true,
|
|
1003
|
+
}),
|
|
1004
|
+
// Row 10-12: System resource gauges and charts
|
|
1005
|
+
createGaugeComponent({
|
|
1006
|
+
title: "CPU Utilization",
|
|
1007
|
+
top: 10,
|
|
1008
|
+
left: 0,
|
|
1009
|
+
width: 3,
|
|
1010
|
+
height: 3,
|
|
1011
|
+
minValue: 0,
|
|
1012
|
+
maxValue: 100,
|
|
1013
|
+
warningThreshold: 70,
|
|
1014
|
+
criticalThreshold: 90,
|
|
1015
|
+
metricConfig: {
|
|
1016
|
+
metricName: MetricDashboardMetricType.SystemCpuUtilization,
|
|
1017
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1018
|
+
},
|
|
1019
|
+
}),
|
|
1020
|
+
createGaugeComponent({
|
|
1021
|
+
title: "Memory Usage",
|
|
1022
|
+
top: 10,
|
|
1023
|
+
left: 3,
|
|
1024
|
+
width: 3,
|
|
1025
|
+
height: 3,
|
|
1026
|
+
minValue: 0,
|
|
1027
|
+
maxValue: 100,
|
|
1028
|
+
warningThreshold: 70,
|
|
1029
|
+
criticalThreshold: 90,
|
|
1030
|
+
metricConfig: {
|
|
1031
|
+
metricName: MetricDashboardMetricType.SystemMemoryUsage,
|
|
1032
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1033
|
+
},
|
|
1034
|
+
}),
|
|
1035
|
+
createChartComponent({
|
|
1036
|
+
title: "CPU Usage Over Time",
|
|
1037
|
+
chartType: DashboardChartType.Area,
|
|
1038
|
+
top: 10,
|
|
1039
|
+
left: 6,
|
|
1040
|
+
width: 6,
|
|
1041
|
+
height: 3,
|
|
1042
|
+
metricConfig: {
|
|
1043
|
+
metricName: MetricDashboardMetricType.SystemCpuUtilization,
|
|
1044
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1045
|
+
legend: "CPU %",
|
|
1046
|
+
legendUnit: "%",
|
|
1047
|
+
},
|
|
1048
|
+
}),
|
|
1049
|
+
// Row 13: Section header
|
|
1050
|
+
createTextComponent({
|
|
1051
|
+
text: "I/O & Network",
|
|
1052
|
+
top: 13,
|
|
1053
|
+
left: 0,
|
|
1054
|
+
width: 12,
|
|
1055
|
+
height: 1,
|
|
1056
|
+
isBold: true,
|
|
1057
|
+
}),
|
|
1058
|
+
// Row 14-16: Disk and network I/O
|
|
1059
|
+
createChartComponent({
|
|
1060
|
+
title: "Disk I/O Over Time",
|
|
1061
|
+
chartType: DashboardChartType.StackedArea,
|
|
1062
|
+
top: 14,
|
|
1063
|
+
left: 0,
|
|
1064
|
+
width: 6,
|
|
1065
|
+
height: 3,
|
|
1066
|
+
metricConfig: {
|
|
1067
|
+
metricName: MetricDashboardMetricType.SystemDiskIo,
|
|
1068
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1069
|
+
legend: "Disk I/O",
|
|
1070
|
+
legendUnit: "bytes",
|
|
1071
|
+
},
|
|
1072
|
+
}),
|
|
1073
|
+
createChartComponent({
|
|
1074
|
+
title: "Network I/O Over Time",
|
|
1075
|
+
chartType: DashboardChartType.StackedArea,
|
|
1076
|
+
top: 14,
|
|
1077
|
+
left: 6,
|
|
1078
|
+
width: 6,
|
|
1079
|
+
height: 3,
|
|
1080
|
+
metricConfig: {
|
|
1081
|
+
metricName: MetricDashboardMetricType.SystemNetworkIo,
|
|
1082
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1083
|
+
legend: "Network I/O",
|
|
1084
|
+
legendUnit: "bytes",
|
|
1085
|
+
},
|
|
1086
|
+
}),
|
|
1087
|
+
// Row 17: Section header
|
|
1088
|
+
createTextComponent({
|
|
1089
|
+
text: "Runtime & Application",
|
|
1090
|
+
top: 17,
|
|
1091
|
+
left: 0,
|
|
1092
|
+
width: 12,
|
|
1093
|
+
height: 1,
|
|
1094
|
+
isBold: true,
|
|
1095
|
+
}),
|
|
1096
|
+
// Row 18-20: Runtime metrics
|
|
1097
|
+
createChartComponent({
|
|
1098
|
+
title: "Process CPU Over Time",
|
|
1099
|
+
chartType: DashboardChartType.Line,
|
|
1100
|
+
top: 18,
|
|
1101
|
+
left: 0,
|
|
1102
|
+
width: 6,
|
|
1103
|
+
height: 3,
|
|
1104
|
+
metricConfig: {
|
|
1105
|
+
metricName: MetricDashboardMetricType.ProcessCpuUtilization,
|
|
1106
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1107
|
+
legend: "Process CPU",
|
|
1108
|
+
legendUnit: "%",
|
|
1109
|
+
},
|
|
1110
|
+
}),
|
|
1111
|
+
createChartComponent({
|
|
1112
|
+
title: "GC Duration Over Time",
|
|
1113
|
+
chartType: DashboardChartType.Bar,
|
|
1114
|
+
top: 18,
|
|
1115
|
+
left: 6,
|
|
1116
|
+
width: 6,
|
|
1117
|
+
height: 3,
|
|
1118
|
+
metricConfig: {
|
|
1119
|
+
metricName: MetricDashboardMetricType.GcDuration,
|
|
1120
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1121
|
+
legend: "GC Duration",
|
|
1122
|
+
legendUnit: "ms",
|
|
1123
|
+
},
|
|
1124
|
+
}),
|
|
1125
|
+
// Row 21-23: Table and logs
|
|
1126
|
+
createTableComponent({
|
|
1127
|
+
title: "Top Metrics by Value",
|
|
1128
|
+
top: 21,
|
|
1129
|
+
left: 0,
|
|
1130
|
+
width: 6,
|
|
1131
|
+
height: 3,
|
|
1132
|
+
metricConfig: {
|
|
1133
|
+
metricName: MetricDashboardMetricType.HttpRequestDuration,
|
|
1134
|
+
aggregationType: MetricsAggregationType.Max,
|
|
1135
|
+
},
|
|
1136
|
+
}),
|
|
1137
|
+
createLogStreamComponent({
|
|
1138
|
+
title: "Recent Logs",
|
|
1139
|
+
top: 21,
|
|
1140
|
+
left: 6,
|
|
1141
|
+
width: 6,
|
|
1142
|
+
height: 3,
|
|
1143
|
+
}),
|
|
1144
|
+
];
|
|
1145
|
+
return {
|
|
1146
|
+
_type: ObjectType.DashboardViewConfig,
|
|
1147
|
+
components,
|
|
1148
|
+
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 24),
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
function createTraceDashboardConfig() {
|
|
1152
|
+
const components = [
|
|
1153
|
+
// Row 0: Title
|
|
1154
|
+
createTextComponent({
|
|
1155
|
+
text: "Trace Dashboard",
|
|
1156
|
+
top: 0,
|
|
1157
|
+
left: 0,
|
|
1158
|
+
width: 12,
|
|
1159
|
+
height: 1,
|
|
1160
|
+
isBold: true,
|
|
1161
|
+
}),
|
|
1162
|
+
// Row 1: Key trace metrics
|
|
1163
|
+
createValueComponent({
|
|
1164
|
+
title: "Span Count",
|
|
1165
|
+
top: 1,
|
|
1166
|
+
left: 0,
|
|
1167
|
+
width: 3,
|
|
1168
|
+
metricConfig: {
|
|
1169
|
+
metricName: SpanMetricType.SpanCount,
|
|
1170
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1171
|
+
},
|
|
1172
|
+
}),
|
|
1173
|
+
createValueComponent({
|
|
1174
|
+
title: "Avg Duration",
|
|
1175
|
+
top: 1,
|
|
1176
|
+
left: 3,
|
|
1177
|
+
width: 3,
|
|
1178
|
+
metricConfig: {
|
|
1179
|
+
metricName: SpanMetricType.SpanDuration,
|
|
1180
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1181
|
+
legendUnit: "ms",
|
|
1182
|
+
},
|
|
1183
|
+
}),
|
|
1184
|
+
createValueComponent({
|
|
1185
|
+
title: "Error Rate",
|
|
1186
|
+
top: 1,
|
|
1187
|
+
left: 6,
|
|
1188
|
+
width: 3,
|
|
1189
|
+
metricConfig: {
|
|
1190
|
+
metricName: SpanMetricType.SpanErrorRate,
|
|
1191
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1192
|
+
legendUnit: "%",
|
|
1193
|
+
},
|
|
1194
|
+
}),
|
|
1195
|
+
createValueComponent({
|
|
1196
|
+
title: "Throughput",
|
|
1197
|
+
top: 1,
|
|
1198
|
+
left: 9,
|
|
1199
|
+
width: 3,
|
|
1200
|
+
metricConfig: {
|
|
1201
|
+
metricName: SpanMetricType.SpanThroughput,
|
|
1202
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1203
|
+
legendUnit: "req/s",
|
|
1204
|
+
},
|
|
1205
|
+
}),
|
|
1206
|
+
// Row 2-4: Throughput and duration charts
|
|
1207
|
+
createChartComponent({
|
|
1208
|
+
title: "Span Throughput Over Time",
|
|
1209
|
+
chartType: DashboardChartType.Bar,
|
|
1210
|
+
top: 2,
|
|
1211
|
+
left: 0,
|
|
1212
|
+
width: 6,
|
|
1213
|
+
height: 3,
|
|
1214
|
+
metricConfig: {
|
|
1215
|
+
metricName: SpanMetricType.SpanCount,
|
|
1216
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1217
|
+
legend: "Spans",
|
|
1218
|
+
},
|
|
1219
|
+
}),
|
|
1220
|
+
createChartComponent({
|
|
1221
|
+
title: "Avg Span Duration Over Time",
|
|
1222
|
+
chartType: DashboardChartType.Line,
|
|
1223
|
+
top: 2,
|
|
1224
|
+
left: 6,
|
|
1225
|
+
width: 6,
|
|
1226
|
+
height: 3,
|
|
1227
|
+
metricConfig: {
|
|
1228
|
+
metricName: SpanMetricType.SpanDuration,
|
|
1229
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1230
|
+
legend: "Avg Duration",
|
|
1231
|
+
legendUnit: "ms",
|
|
1232
|
+
},
|
|
1233
|
+
}),
|
|
1234
|
+
// Row 5: Section header
|
|
1235
|
+
createTextComponent({
|
|
1236
|
+
text: "Latency Percentiles",
|
|
1237
|
+
top: 5,
|
|
1238
|
+
left: 0,
|
|
1239
|
+
width: 12,
|
|
1240
|
+
height: 1,
|
|
1241
|
+
isBold: true,
|
|
1242
|
+
}),
|
|
1243
|
+
// Row 6: Latency percentile values
|
|
1244
|
+
createValueComponent({
|
|
1245
|
+
title: "P50 Latency",
|
|
1246
|
+
top: 6,
|
|
1247
|
+
left: 0,
|
|
1248
|
+
width: 3,
|
|
1249
|
+
metricConfig: {
|
|
1250
|
+
metricName: SpanMetricType.SpanP50Duration,
|
|
1251
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1252
|
+
legendUnit: "ms",
|
|
1253
|
+
},
|
|
1254
|
+
}),
|
|
1255
|
+
createValueComponent({
|
|
1256
|
+
title: "P90 Latency",
|
|
1257
|
+
top: 6,
|
|
1258
|
+
left: 3,
|
|
1259
|
+
width: 3,
|
|
1260
|
+
metricConfig: {
|
|
1261
|
+
metricName: SpanMetricType.SpanP90Duration,
|
|
1262
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1263
|
+
legendUnit: "ms",
|
|
1264
|
+
},
|
|
1265
|
+
}),
|
|
1266
|
+
createValueComponent({
|
|
1267
|
+
title: "P95 Latency",
|
|
1268
|
+
top: 6,
|
|
1269
|
+
left: 6,
|
|
1270
|
+
width: 3,
|
|
1271
|
+
metricConfig: {
|
|
1272
|
+
metricName: SpanMetricType.SpanP95Duration,
|
|
1273
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1274
|
+
legendUnit: "ms",
|
|
1275
|
+
},
|
|
1276
|
+
}),
|
|
1277
|
+
createValueComponent({
|
|
1278
|
+
title: "P99 Latency",
|
|
1279
|
+
top: 6,
|
|
1280
|
+
left: 9,
|
|
1281
|
+
width: 3,
|
|
1282
|
+
metricConfig: {
|
|
1283
|
+
metricName: SpanMetricType.SpanP99Duration,
|
|
1284
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1285
|
+
legendUnit: "ms",
|
|
1286
|
+
},
|
|
1287
|
+
}),
|
|
1288
|
+
// Row 7-9: Latency percentile charts
|
|
1289
|
+
createChartComponent({
|
|
1290
|
+
title: "Latency Percentiles Over Time",
|
|
1291
|
+
chartType: DashboardChartType.Line,
|
|
1292
|
+
top: 7,
|
|
1293
|
+
left: 0,
|
|
1294
|
+
width: 6,
|
|
1295
|
+
height: 3,
|
|
1296
|
+
metricConfig: {
|
|
1297
|
+
metricName: SpanMetricType.SpanP95Duration,
|
|
1298
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1299
|
+
legend: "P95 Latency",
|
|
1300
|
+
legendUnit: "ms",
|
|
1301
|
+
},
|
|
1302
|
+
}),
|
|
1303
|
+
createChartComponent({
|
|
1304
|
+
title: "Latency Distribution",
|
|
1305
|
+
chartType: DashboardChartType.Histogram,
|
|
1306
|
+
top: 7,
|
|
1307
|
+
left: 6,
|
|
1308
|
+
width: 6,
|
|
1309
|
+
height: 3,
|
|
1310
|
+
metricConfig: {
|
|
1311
|
+
metricName: SpanMetricType.SpanDuration,
|
|
1312
|
+
aggregationType: MetricsAggregationType.Count,
|
|
1313
|
+
legend: "Latency Distribution",
|
|
1314
|
+
legendUnit: "ms",
|
|
1315
|
+
},
|
|
1316
|
+
}),
|
|
1317
|
+
// Row 10: Section header
|
|
1318
|
+
createTextComponent({
|
|
1319
|
+
text: "Error Analysis",
|
|
1320
|
+
top: 10,
|
|
1321
|
+
left: 0,
|
|
1322
|
+
width: 12,
|
|
1323
|
+
height: 1,
|
|
1324
|
+
isBold: true,
|
|
1325
|
+
}),
|
|
1326
|
+
// Row 11-13: Error charts and status breakdown
|
|
1327
|
+
createGaugeComponent({
|
|
1328
|
+
title: "Error Rate",
|
|
1329
|
+
top: 11,
|
|
1330
|
+
left: 0,
|
|
1331
|
+
width: 3,
|
|
1332
|
+
height: 3,
|
|
1333
|
+
minValue: 0,
|
|
1334
|
+
maxValue: 100,
|
|
1335
|
+
warningThreshold: 5,
|
|
1336
|
+
criticalThreshold: 15,
|
|
1337
|
+
metricConfig: {
|
|
1338
|
+
metricName: SpanMetricType.SpanErrorRate,
|
|
1339
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1340
|
+
},
|
|
1341
|
+
}),
|
|
1342
|
+
createChartComponent({
|
|
1343
|
+
title: "Errors Over Time",
|
|
1344
|
+
chartType: DashboardChartType.Area,
|
|
1345
|
+
top: 11,
|
|
1346
|
+
left: 3,
|
|
1347
|
+
width: 6,
|
|
1348
|
+
height: 3,
|
|
1349
|
+
metricConfig: {
|
|
1350
|
+
metricName: SpanMetricType.SpanErrorCount,
|
|
1351
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1352
|
+
legend: "Errors",
|
|
1353
|
+
},
|
|
1354
|
+
}),
|
|
1355
|
+
createChartComponent({
|
|
1356
|
+
title: "Span Status Breakdown",
|
|
1357
|
+
chartType: DashboardChartType.Pie,
|
|
1358
|
+
top: 11,
|
|
1359
|
+
left: 9,
|
|
1360
|
+
width: 3,
|
|
1361
|
+
height: 3,
|
|
1362
|
+
metricConfig: {
|
|
1363
|
+
metricName: SpanMetricType.SpanStatusOk,
|
|
1364
|
+
aggregationType: MetricsAggregationType.Count,
|
|
1365
|
+
legend: "Status",
|
|
1366
|
+
},
|
|
1367
|
+
}),
|
|
1368
|
+
// Row 14: Section header
|
|
1369
|
+
createTextComponent({
|
|
1370
|
+
text: "Trace Details",
|
|
1371
|
+
top: 14,
|
|
1372
|
+
left: 0,
|
|
1373
|
+
width: 12,
|
|
1374
|
+
height: 1,
|
|
1375
|
+
isBold: true,
|
|
1376
|
+
}),
|
|
1377
|
+
// Row 15-17: Table of slowest spans and request rate
|
|
1378
|
+
createTableComponent({
|
|
1379
|
+
title: "Slowest Spans",
|
|
1380
|
+
top: 15,
|
|
1381
|
+
left: 0,
|
|
1382
|
+
width: 6,
|
|
1383
|
+
height: 3,
|
|
1384
|
+
metricConfig: {
|
|
1385
|
+
metricName: SpanMetricType.SpanDuration,
|
|
1386
|
+
aggregationType: MetricsAggregationType.Max,
|
|
1387
|
+
},
|
|
1388
|
+
}),
|
|
1389
|
+
createChartComponent({
|
|
1390
|
+
title: "Request Rate Over Time",
|
|
1391
|
+
chartType: DashboardChartType.StackedArea,
|
|
1392
|
+
top: 15,
|
|
1393
|
+
left: 6,
|
|
1394
|
+
width: 6,
|
|
1395
|
+
height: 3,
|
|
1396
|
+
metricConfig: {
|
|
1397
|
+
metricName: SpanMetricType.SpanRequestRate,
|
|
1398
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1399
|
+
legend: "Request Rate",
|
|
1400
|
+
legendUnit: "req/s",
|
|
1401
|
+
},
|
|
1402
|
+
}),
|
|
1403
|
+
// Row 18-20: Recent traces and logs
|
|
1404
|
+
createTraceListComponent({
|
|
1405
|
+
title: "Recent Traces",
|
|
1406
|
+
top: 18,
|
|
1407
|
+
left: 0,
|
|
1408
|
+
width: 6,
|
|
1409
|
+
height: 3,
|
|
1410
|
+
}),
|
|
1411
|
+
createLogStreamComponent({
|
|
1412
|
+
title: "Related Logs",
|
|
1413
|
+
top: 18,
|
|
1414
|
+
left: 6,
|
|
1415
|
+
width: 6,
|
|
1416
|
+
height: 3,
|
|
1417
|
+
}),
|
|
1418
|
+
];
|
|
1419
|
+
return {
|
|
1420
|
+
_type: ObjectType.DashboardViewConfig,
|
|
1421
|
+
components,
|
|
1422
|
+
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 21),
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
function createExceptionDashboardConfig() {
|
|
1426
|
+
const components = [
|
|
1427
|
+
// Row 0: Title
|
|
1428
|
+
createTextComponent({
|
|
1429
|
+
text: "Exception Dashboard",
|
|
1430
|
+
top: 0,
|
|
1431
|
+
left: 0,
|
|
1432
|
+
width: 12,
|
|
1433
|
+
height: 1,
|
|
1434
|
+
isBold: true,
|
|
1435
|
+
}),
|
|
1436
|
+
// Row 1: Key exception metrics
|
|
1437
|
+
createValueComponent({
|
|
1438
|
+
title: "Total Exceptions",
|
|
1439
|
+
top: 1,
|
|
1440
|
+
left: 0,
|
|
1441
|
+
width: 3,
|
|
1442
|
+
metricConfig: {
|
|
1443
|
+
metricName: ExceptionMetricType.ExceptionCount,
|
|
1444
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1445
|
+
},
|
|
1446
|
+
}),
|
|
1447
|
+
createValueComponent({
|
|
1448
|
+
title: "Exception Rate",
|
|
1449
|
+
top: 1,
|
|
1450
|
+
left: 3,
|
|
1451
|
+
width: 3,
|
|
1452
|
+
metricConfig: {
|
|
1453
|
+
metricName: ExceptionMetricType.ExceptionRate,
|
|
1454
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1455
|
+
legendUnit: "/min",
|
|
1456
|
+
},
|
|
1457
|
+
}),
|
|
1458
|
+
createValueComponent({
|
|
1459
|
+
title: "Unresolved",
|
|
1460
|
+
top: 1,
|
|
1461
|
+
left: 6,
|
|
1462
|
+
width: 3,
|
|
1463
|
+
metricConfig: {
|
|
1464
|
+
metricName: ExceptionMetricType.UnresolvedExceptionCount,
|
|
1465
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1466
|
+
},
|
|
1467
|
+
}),
|
|
1468
|
+
createValueComponent({
|
|
1469
|
+
title: "Affected Services",
|
|
1470
|
+
top: 1,
|
|
1471
|
+
left: 9,
|
|
1472
|
+
width: 3,
|
|
1473
|
+
metricConfig: {
|
|
1474
|
+
metricName: ExceptionMetricType.ExceptionAffectedServiceCount,
|
|
1475
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1476
|
+
},
|
|
1477
|
+
}),
|
|
1478
|
+
// Row 2-4: Exception trends
|
|
1479
|
+
createChartComponent({
|
|
1480
|
+
title: "Exceptions Over Time",
|
|
1481
|
+
chartType: DashboardChartType.Bar,
|
|
1482
|
+
top: 2,
|
|
1483
|
+
left: 0,
|
|
1484
|
+
width: 6,
|
|
1485
|
+
height: 3,
|
|
1486
|
+
metricConfig: {
|
|
1487
|
+
metricName: ExceptionMetricType.ExceptionCount,
|
|
1488
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1489
|
+
legend: "Exceptions",
|
|
1490
|
+
},
|
|
1491
|
+
}),
|
|
1492
|
+
createChartComponent({
|
|
1493
|
+
title: "Exception Rate Over Time",
|
|
1494
|
+
chartType: DashboardChartType.Line,
|
|
1495
|
+
top: 2,
|
|
1496
|
+
left: 6,
|
|
1497
|
+
width: 6,
|
|
1498
|
+
height: 3,
|
|
1499
|
+
metricConfig: {
|
|
1500
|
+
metricName: ExceptionMetricType.ExceptionRate,
|
|
1501
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1502
|
+
legend: "Exception Rate",
|
|
1503
|
+
legendUnit: "/min",
|
|
1504
|
+
},
|
|
1505
|
+
}),
|
|
1506
|
+
// Row 5: Section header
|
|
1507
|
+
createTextComponent({
|
|
1508
|
+
text: "Exception Breakdown",
|
|
1509
|
+
top: 5,
|
|
1510
|
+
left: 0,
|
|
1511
|
+
width: 12,
|
|
1512
|
+
height: 1,
|
|
1513
|
+
isBold: true,
|
|
1514
|
+
}),
|
|
1515
|
+
// Row 6-8: Exception type and service breakdown
|
|
1516
|
+
createChartComponent({
|
|
1517
|
+
title: "Exceptions by Type",
|
|
1518
|
+
chartType: DashboardChartType.Pie,
|
|
1519
|
+
top: 6,
|
|
1520
|
+
left: 0,
|
|
1521
|
+
width: 6,
|
|
1522
|
+
height: 3,
|
|
1523
|
+
metricConfig: {
|
|
1524
|
+
metricName: ExceptionMetricType.ExceptionCountByType,
|
|
1525
|
+
aggregationType: MetricsAggregationType.Count,
|
|
1526
|
+
legend: "Exception Type",
|
|
1527
|
+
},
|
|
1528
|
+
}),
|
|
1529
|
+
createChartComponent({
|
|
1530
|
+
title: "Exceptions by Service",
|
|
1531
|
+
chartType: DashboardChartType.Bar,
|
|
1532
|
+
top: 6,
|
|
1533
|
+
left: 6,
|
|
1534
|
+
width: 6,
|
|
1535
|
+
height: 3,
|
|
1536
|
+
metricConfig: {
|
|
1537
|
+
metricName: ExceptionMetricType.ExceptionCountByService,
|
|
1538
|
+
aggregationType: MetricsAggregationType.Count,
|
|
1539
|
+
legend: "Service",
|
|
1540
|
+
},
|
|
1541
|
+
}),
|
|
1542
|
+
// Row 9: Section header
|
|
1543
|
+
createTextComponent({
|
|
1544
|
+
text: "Resolution Status",
|
|
1545
|
+
top: 9,
|
|
1546
|
+
left: 0,
|
|
1547
|
+
width: 12,
|
|
1548
|
+
height: 1,
|
|
1549
|
+
isBold: true,
|
|
1550
|
+
}),
|
|
1551
|
+
// Row 10-12: Resolution gauges and resolution trends
|
|
1552
|
+
createGaugeComponent({
|
|
1553
|
+
title: "Unresolved Exceptions",
|
|
1554
|
+
top: 10,
|
|
1555
|
+
left: 0,
|
|
1556
|
+
width: 3,
|
|
1557
|
+
height: 3,
|
|
1558
|
+
minValue: 0,
|
|
1559
|
+
maxValue: 100,
|
|
1560
|
+
warningThreshold: 25,
|
|
1561
|
+
criticalThreshold: 50,
|
|
1562
|
+
metricConfig: {
|
|
1563
|
+
metricName: ExceptionMetricType.UnresolvedExceptionCount,
|
|
1564
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1565
|
+
},
|
|
1566
|
+
}),
|
|
1567
|
+
createGaugeComponent({
|
|
1568
|
+
title: "Muted Exceptions",
|
|
1569
|
+
top: 10,
|
|
1570
|
+
left: 3,
|
|
1571
|
+
width: 3,
|
|
1572
|
+
height: 3,
|
|
1573
|
+
minValue: 0,
|
|
1574
|
+
maxValue: 100,
|
|
1575
|
+
metricConfig: {
|
|
1576
|
+
metricName: ExceptionMetricType.MutedExceptionCount,
|
|
1577
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1578
|
+
},
|
|
1579
|
+
}),
|
|
1580
|
+
createChartComponent({
|
|
1581
|
+
title: "Resolution Status Over Time",
|
|
1582
|
+
chartType: DashboardChartType.StackedArea,
|
|
1583
|
+
top: 10,
|
|
1584
|
+
left: 6,
|
|
1585
|
+
width: 6,
|
|
1586
|
+
height: 3,
|
|
1587
|
+
metricConfig: {
|
|
1588
|
+
metricName: ExceptionMetricType.ResolvedExceptionCount,
|
|
1589
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1590
|
+
legend: "Resolved",
|
|
1591
|
+
},
|
|
1592
|
+
}),
|
|
1593
|
+
// Row 13: Section header
|
|
1594
|
+
createTextComponent({
|
|
1595
|
+
text: "Exception Recurrence",
|
|
1596
|
+
top: 13,
|
|
1597
|
+
left: 0,
|
|
1598
|
+
width: 12,
|
|
1599
|
+
height: 1,
|
|
1600
|
+
isBold: true,
|
|
1601
|
+
}),
|
|
1602
|
+
// Row 14-16: Occurrence trends and top exceptions table
|
|
1603
|
+
createChartComponent({
|
|
1604
|
+
title: "Exception Occurrences Over Time",
|
|
1605
|
+
chartType: DashboardChartType.Heatmap,
|
|
1606
|
+
top: 14,
|
|
1607
|
+
left: 0,
|
|
1608
|
+
width: 6,
|
|
1609
|
+
height: 3,
|
|
1610
|
+
metricConfig: {
|
|
1611
|
+
metricName: ExceptionMetricType.ExceptionOccurrenceCount,
|
|
1612
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1613
|
+
legend: "Occurrences",
|
|
1614
|
+
},
|
|
1615
|
+
}),
|
|
1616
|
+
createTableComponent({
|
|
1617
|
+
title: "Top Exceptions by Occurrence",
|
|
1618
|
+
top: 14,
|
|
1619
|
+
left: 6,
|
|
1620
|
+
width: 6,
|
|
1621
|
+
height: 3,
|
|
1622
|
+
metricConfig: {
|
|
1623
|
+
metricName: ExceptionMetricType.ExceptionOccurrenceCount,
|
|
1624
|
+
aggregationType: MetricsAggregationType.Max,
|
|
1625
|
+
},
|
|
1626
|
+
}),
|
|
1627
|
+
// Row 17: Section header
|
|
1628
|
+
createTextComponent({
|
|
1629
|
+
text: "Exception Details",
|
|
1630
|
+
top: 17,
|
|
1631
|
+
left: 0,
|
|
1632
|
+
width: 12,
|
|
1633
|
+
height: 1,
|
|
1634
|
+
isBold: true,
|
|
1635
|
+
}),
|
|
1636
|
+
// Row 18-20: Logs and traces
|
|
1637
|
+
createLogStreamComponent({
|
|
1638
|
+
title: "Exception Logs",
|
|
1639
|
+
top: 18,
|
|
1640
|
+
left: 0,
|
|
1641
|
+
width: 6,
|
|
1642
|
+
height: 3,
|
|
1643
|
+
}),
|
|
1644
|
+
createTraceListComponent({
|
|
1645
|
+
title: "Related Traces",
|
|
1646
|
+
top: 18,
|
|
1647
|
+
left: 6,
|
|
1648
|
+
width: 6,
|
|
1649
|
+
height: 3,
|
|
1650
|
+
}),
|
|
1651
|
+
];
|
|
1652
|
+
return {
|
|
1653
|
+
_type: ObjectType.DashboardViewConfig,
|
|
1654
|
+
components,
|
|
1655
|
+
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 21),
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
function createProfilesDashboardConfig() {
|
|
1659
|
+
const components = [
|
|
1660
|
+
// Row 0: Title
|
|
1661
|
+
createTextComponent({
|
|
1662
|
+
text: "Profiles Dashboard",
|
|
1663
|
+
top: 0,
|
|
1664
|
+
left: 0,
|
|
1665
|
+
width: 12,
|
|
1666
|
+
height: 1,
|
|
1667
|
+
isBold: true,
|
|
1668
|
+
}),
|
|
1669
|
+
// Row 1: Key profile metrics
|
|
1670
|
+
createValueComponent({
|
|
1671
|
+
title: "Profile Count",
|
|
1672
|
+
top: 1,
|
|
1673
|
+
left: 0,
|
|
1674
|
+
width: 3,
|
|
1675
|
+
metricConfig: {
|
|
1676
|
+
metricName: ProfileMetricType.ProfileCount,
|
|
1677
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1678
|
+
},
|
|
1679
|
+
}),
|
|
1680
|
+
createValueComponent({
|
|
1681
|
+
title: "CPU Profile Duration",
|
|
1682
|
+
top: 1,
|
|
1683
|
+
left: 3,
|
|
1684
|
+
width: 3,
|
|
1685
|
+
metricConfig: {
|
|
1686
|
+
metricName: ProfileMetricType.CpuProfileDuration,
|
|
1687
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1688
|
+
legendUnit: "ms",
|
|
1689
|
+
},
|
|
1690
|
+
}),
|
|
1691
|
+
createValueComponent({
|
|
1692
|
+
title: "Memory Allocations",
|
|
1693
|
+
top: 1,
|
|
1694
|
+
left: 6,
|
|
1695
|
+
width: 3,
|
|
1696
|
+
metricConfig: {
|
|
1697
|
+
metricName: ProfileMetricType.MemoryAllocationCount,
|
|
1698
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1699
|
+
},
|
|
1700
|
+
}),
|
|
1701
|
+
createValueComponent({
|
|
1702
|
+
title: "Thread Count",
|
|
1703
|
+
top: 1,
|
|
1704
|
+
left: 9,
|
|
1705
|
+
width: 3,
|
|
1706
|
+
metricConfig: {
|
|
1707
|
+
metricName: ProfileMetricType.ThreadCount,
|
|
1708
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1709
|
+
},
|
|
1710
|
+
}),
|
|
1711
|
+
// Row 2-4: CPU profile charts
|
|
1712
|
+
createChartComponent({
|
|
1713
|
+
title: "CPU Profile Duration Over Time",
|
|
1714
|
+
chartType: DashboardChartType.Line,
|
|
1715
|
+
top: 2,
|
|
1716
|
+
left: 0,
|
|
1717
|
+
width: 6,
|
|
1718
|
+
height: 3,
|
|
1719
|
+
metricConfig: {
|
|
1720
|
+
metricName: ProfileMetricType.CpuProfileDuration,
|
|
1721
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1722
|
+
legend: "CPU Duration",
|
|
1723
|
+
legendUnit: "ms",
|
|
1724
|
+
},
|
|
1725
|
+
}),
|
|
1726
|
+
createChartComponent({
|
|
1727
|
+
title: "CPU Sample Count Over Time",
|
|
1728
|
+
chartType: DashboardChartType.Bar,
|
|
1729
|
+
top: 2,
|
|
1730
|
+
left: 6,
|
|
1731
|
+
width: 6,
|
|
1732
|
+
height: 3,
|
|
1733
|
+
metricConfig: {
|
|
1734
|
+
metricName: ProfileMetricType.CpuProfileSampleCount,
|
|
1735
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1736
|
+
legend: "CPU Samples",
|
|
1737
|
+
},
|
|
1738
|
+
}),
|
|
1739
|
+
// Row 5: Section header
|
|
1740
|
+
createTextComponent({
|
|
1741
|
+
text: "Memory Profiling",
|
|
1742
|
+
top: 5,
|
|
1743
|
+
left: 0,
|
|
1744
|
+
width: 12,
|
|
1745
|
+
height: 1,
|
|
1746
|
+
isBold: true,
|
|
1747
|
+
}),
|
|
1748
|
+
// Row 6-8: Memory gauges and allocation charts
|
|
1749
|
+
createGaugeComponent({
|
|
1750
|
+
title: "Heap Usage",
|
|
1751
|
+
top: 6,
|
|
1752
|
+
left: 0,
|
|
1753
|
+
width: 3,
|
|
1754
|
+
height: 3,
|
|
1755
|
+
minValue: 0,
|
|
1756
|
+
maxValue: 100,
|
|
1757
|
+
warningThreshold: 70,
|
|
1758
|
+
criticalThreshold: 90,
|
|
1759
|
+
metricConfig: {
|
|
1760
|
+
metricName: ProfileMetricType.HeapUsage,
|
|
1761
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1762
|
+
},
|
|
1763
|
+
}),
|
|
1764
|
+
createChartComponent({
|
|
1765
|
+
title: "Memory Allocation Size Over Time",
|
|
1766
|
+
chartType: DashboardChartType.Area,
|
|
1767
|
+
top: 6,
|
|
1768
|
+
left: 3,
|
|
1769
|
+
width: 6,
|
|
1770
|
+
height: 3,
|
|
1771
|
+
metricConfig: {
|
|
1772
|
+
metricName: ProfileMetricType.MemoryAllocationSize,
|
|
1773
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1774
|
+
legend: "Allocation Size",
|
|
1775
|
+
legendUnit: "bytes",
|
|
1776
|
+
},
|
|
1777
|
+
}),
|
|
1778
|
+
createGaugeComponent({
|
|
1779
|
+
title: "Thread Count",
|
|
1780
|
+
top: 6,
|
|
1781
|
+
left: 9,
|
|
1782
|
+
width: 3,
|
|
1783
|
+
height: 3,
|
|
1784
|
+
minValue: 0,
|
|
1785
|
+
maxValue: 500,
|
|
1786
|
+
warningThreshold: 200,
|
|
1787
|
+
criticalThreshold: 400,
|
|
1788
|
+
metricConfig: {
|
|
1789
|
+
metricName: ProfileMetricType.ThreadCount,
|
|
1790
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1791
|
+
},
|
|
1792
|
+
}),
|
|
1793
|
+
// Row 9: Section header
|
|
1794
|
+
createTextComponent({
|
|
1795
|
+
text: "Allocation Trends",
|
|
1796
|
+
top: 9,
|
|
1797
|
+
left: 0,
|
|
1798
|
+
width: 12,
|
|
1799
|
+
height: 1,
|
|
1800
|
+
isBold: true,
|
|
1801
|
+
}),
|
|
1802
|
+
// Row 10-12: Allocation count trends and heap trends
|
|
1803
|
+
createChartComponent({
|
|
1804
|
+
title: "Memory Allocation Count Over Time",
|
|
1805
|
+
chartType: DashboardChartType.Bar,
|
|
1806
|
+
top: 10,
|
|
1807
|
+
left: 0,
|
|
1808
|
+
width: 6,
|
|
1809
|
+
height: 3,
|
|
1810
|
+
metricConfig: {
|
|
1811
|
+
metricName: ProfileMetricType.MemoryAllocationCount,
|
|
1812
|
+
aggregationType: MetricsAggregationType.Sum,
|
|
1813
|
+
legend: "Allocations",
|
|
1814
|
+
},
|
|
1815
|
+
}),
|
|
1816
|
+
createChartComponent({
|
|
1817
|
+
title: "Heap Usage Over Time",
|
|
1818
|
+
chartType: DashboardChartType.Area,
|
|
1819
|
+
top: 10,
|
|
1820
|
+
left: 6,
|
|
1821
|
+
width: 6,
|
|
1822
|
+
height: 3,
|
|
1823
|
+
metricConfig: {
|
|
1824
|
+
metricName: ProfileMetricType.HeapUsage,
|
|
1825
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1826
|
+
legend: "Heap",
|
|
1827
|
+
legendUnit: "bytes",
|
|
1828
|
+
},
|
|
1829
|
+
}),
|
|
1830
|
+
// Row 13: Section header
|
|
1831
|
+
createTextComponent({
|
|
1832
|
+
text: "Runtime & Concurrency",
|
|
1833
|
+
top: 13,
|
|
1834
|
+
left: 0,
|
|
1835
|
+
width: 12,
|
|
1836
|
+
height: 1,
|
|
1837
|
+
isBold: true,
|
|
1838
|
+
}),
|
|
1839
|
+
// Row 14-16: Wall clock, goroutines/threads, sample rate
|
|
1840
|
+
createChartComponent({
|
|
1841
|
+
title: "Wall Clock Duration Over Time",
|
|
1842
|
+
chartType: DashboardChartType.Line,
|
|
1843
|
+
top: 14,
|
|
1844
|
+
left: 0,
|
|
1845
|
+
width: 6,
|
|
1846
|
+
height: 3,
|
|
1847
|
+
metricConfig: {
|
|
1848
|
+
metricName: ProfileMetricType.WallClockDuration,
|
|
1849
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1850
|
+
legend: "Wall Clock",
|
|
1851
|
+
legendUnit: "ms",
|
|
1852
|
+
},
|
|
1853
|
+
}),
|
|
1854
|
+
createChartComponent({
|
|
1855
|
+
title: "Goroutine / Thread Count Over Time",
|
|
1856
|
+
chartType: DashboardChartType.StackedArea,
|
|
1857
|
+
top: 14,
|
|
1858
|
+
left: 6,
|
|
1859
|
+
width: 6,
|
|
1860
|
+
height: 3,
|
|
1861
|
+
metricConfig: {
|
|
1862
|
+
metricName: ProfileMetricType.GoroutineCount,
|
|
1863
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1864
|
+
legend: "Goroutines / Threads",
|
|
1865
|
+
},
|
|
1866
|
+
}),
|
|
1867
|
+
// Row 17: Section header
|
|
1868
|
+
createTextComponent({
|
|
1869
|
+
text: "Hot Functions",
|
|
1870
|
+
top: 17,
|
|
1871
|
+
left: 0,
|
|
1872
|
+
width: 12,
|
|
1873
|
+
height: 1,
|
|
1874
|
+
isBold: true,
|
|
1875
|
+
}),
|
|
1876
|
+
// Row 18-20: Top functions tables
|
|
1877
|
+
createTableComponent({
|
|
1878
|
+
title: "Top Functions by CPU Time",
|
|
1879
|
+
top: 18,
|
|
1880
|
+
left: 0,
|
|
1881
|
+
width: 6,
|
|
1882
|
+
height: 3,
|
|
1883
|
+
metricConfig: {
|
|
1884
|
+
metricName: ProfileMetricType.TopFunctionCpuTime,
|
|
1885
|
+
aggregationType: MetricsAggregationType.Max,
|
|
1886
|
+
},
|
|
1887
|
+
}),
|
|
1888
|
+
createTableComponent({
|
|
1889
|
+
title: "Top Functions by Allocations",
|
|
1890
|
+
top: 18,
|
|
1891
|
+
left: 6,
|
|
1892
|
+
width: 6,
|
|
1893
|
+
height: 3,
|
|
1894
|
+
metricConfig: {
|
|
1895
|
+
metricName: ProfileMetricType.TopFunctionAllocations,
|
|
1896
|
+
aggregationType: MetricsAggregationType.Max,
|
|
1897
|
+
},
|
|
1898
|
+
}),
|
|
1899
|
+
// Row 21-23: Profile sample rate and logs
|
|
1900
|
+
createChartComponent({
|
|
1901
|
+
title: "Profile Sample Rate Over Time",
|
|
1902
|
+
chartType: DashboardChartType.Line,
|
|
1903
|
+
top: 21,
|
|
1904
|
+
left: 0,
|
|
1905
|
+
width: 6,
|
|
1906
|
+
height: 3,
|
|
1907
|
+
metricConfig: {
|
|
1908
|
+
metricName: ProfileMetricType.ProfileSampleRate,
|
|
1909
|
+
aggregationType: MetricsAggregationType.Avg,
|
|
1910
|
+
legend: "Sample Rate",
|
|
1911
|
+
legendUnit: "samples/s",
|
|
1912
|
+
},
|
|
1913
|
+
}),
|
|
1914
|
+
createLogStreamComponent({
|
|
1915
|
+
title: "Related Logs",
|
|
1916
|
+
top: 21,
|
|
1917
|
+
left: 6,
|
|
1918
|
+
width: 6,
|
|
1919
|
+
height: 3,
|
|
1920
|
+
}),
|
|
1921
|
+
];
|
|
1922
|
+
return {
|
|
1923
|
+
_type: ObjectType.DashboardViewConfig,
|
|
1924
|
+
components,
|
|
1925
|
+
heightInDashboardUnits: Math.max(DashboardSize.heightInDashboardUnits, 24),
|
|
1926
|
+
};
|
|
1927
|
+
}
|
|
841
1928
|
export function getTemplateConfig(type) {
|
|
842
1929
|
switch (type) {
|
|
843
1930
|
case DashboardTemplateType.Monitor:
|
|
@@ -846,6 +1933,14 @@ export function getTemplateConfig(type) {
|
|
|
846
1933
|
return createIncidentDashboardConfig();
|
|
847
1934
|
case DashboardTemplateType.Kubernetes:
|
|
848
1935
|
return createKubernetesDashboardConfig();
|
|
1936
|
+
case DashboardTemplateType.Metrics:
|
|
1937
|
+
return createMetricsDashboardConfig();
|
|
1938
|
+
case DashboardTemplateType.Trace:
|
|
1939
|
+
return createTraceDashboardConfig();
|
|
1940
|
+
case DashboardTemplateType.Exception:
|
|
1941
|
+
return createExceptionDashboardConfig();
|
|
1942
|
+
case DashboardTemplateType.Profiles:
|
|
1943
|
+
return createProfilesDashboardConfig();
|
|
849
1944
|
case DashboardTemplateType.Blank:
|
|
850
1945
|
return null;
|
|
851
1946
|
}
|