Skip to content

Commit

Permalink
Added improved JVM runtime metrics dashboard.
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
  • Loading branch information
AlexanderWert committed Jul 25, 2023
1 parent d2825d9 commit 708520a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
15 changes: 8 additions & 7 deletions x-pack/plugins/apm/public/components/app/metrics/index.tsx
Expand Up @@ -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 />;
}
Expand All @@ -38,6 +31,7 @@ export function Metrics() {
runtimeName,
serverlessType,
});

if (hasStaticDashboard) {
return (
<JsonMetricsDashboard
Expand All @@ -48,5 +42,12 @@ export function Metrics() {
);
}

if (
!isAWSLambda &&
(isJavaAgentName(agentName) || isJRubyAgent(agentName, runtimeName))
) {
return <JvmMetricsOverview />;
}

return <ServiceMetrics />;
}
Expand Up @@ -7,6 +7,7 @@

export const AGENT_NAME_DASHBOARD_FILE_MAPPING: Record<string, string> = {
nodejs: 'nodejs',
java: 'java',
};

/**
Expand All @@ -21,6 +22,12 @@ export async function loadDashboardFile(filename: string): Promise<any> {
'./nodejs.json'
);
}
case 'java': {
return import(
/* webpackChunkName: "lazyNodeJsDashboard" */
'./java.json'
);
}
default: {
break;
}
Expand Down

Large diffs are not rendered by default.

0 comments on commit 708520a

Please sign in to comment.