[APM] Added improved JVM runtime metrics dashboard. (#162460)

## Summary

Replaces the current JVM runtime metrics dashboard with a more advanced
dashboard (based on the portable dashboards feature).

Additional information (that has not been shown in the previous view):
- memory allocation rate
- Heap usage split by memory pools

<img width="1428" alt="image"
src="c147f9c4-b115-455e-a86e-c288a94e25cb">
<img width="1424" alt="image"
src="3ff8978f-917f-4b5e-bd82-fe3a52fe78c7">

---------

Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
This commit is contained in:
Alexander Wert 2023-07-26 14:58:05 +02:00 committed by GitHub
parent e8a705e454
commit 5d7ea97272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View file

@ -22,13 +22,6 @@ export function Metrics() {
const { agentName, runtimeName, serverlessType } = useApmServiceContext();
const isAWSLambda = isAWSLambdaAgent(serverlessType);
if (
!isAWSLambda &&
(isJavaAgentName(agentName) || isJRubyAgent(agentName, runtimeName))
) {
return <JvmMetricsOverview />;
}
if (isAWSLambda) {
return <ServerlessMetrics />;
}
@ -38,6 +31,7 @@ export function Metrics() {
runtimeName,
serverlessType,
});
if (hasStaticDashboard) {
return (
<JsonMetricsDashboard
@ -48,5 +42,12 @@ export function Metrics() {
);
}
if (
!isAWSLambda &&
(isJavaAgentName(agentName) || isJRubyAgent(agentName, runtimeName))
) {
return <JvmMetricsOverview />;
}
return <ServiceMetrics />;
}

View file

@ -7,6 +7,7 @@
export const AGENT_NAME_DASHBOARD_FILE_MAPPING: Record<string, string> = {
nodejs: 'nodejs',
java: 'java',
};
/**
@ -21,6 +22,12 @@ export async function loadDashboardFile(filename: string): Promise<any> {
'./nodejs.json'
);
}
case 'java': {
return import(
/* webpackChunkName: "lazyJavaDashboard" */
'./java.json'
);
}
default: {
break;
}

File diff suppressed because one or more lines are too long