Skip to content

Commit

Permalink
[APM] checks if is serverless first in order to show java lambda metr…
Browse files Browse the repository at this point in the history
…ics (elastic#142849)

* [APM] checks if is serverless first in order to show java lambda metrics

* addressing pr comments
  • Loading branch information
cauemarcondes authored and WafaaNasr committed Oct 14, 2022
1 parent 7198b6e commit af09022
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ export async function getMetricsChartDataByAgent({
start,
end,
};
if (isJavaAgentName(agentName)) {
const serverlessAgent = isServerlessAgent(serviceRuntimeName);

if (isJavaAgentName(agentName) && !serverlessAgent) {
return getJavaMetricsCharts({
...options,
serviceNodeName,
});
}

if (isServerlessAgent(serviceRuntimeName)) {
if (serverlessAgent) {
return getServerlessAgentMetricCharts(options);
}

Expand Down

0 comments on commit af09022

Please sign in to comment.