import { Setup } from '../../lib/helpers/setup_request' ; import { getJavaMetricsCharts } from './by_agent/java' ; import { getDefaultMetricsCharts } from './by_agent/default' ; import { isJavaAgentName } from '../../../common/agent_name' ; import { GenericMetricsChart } from './fetch_and_transform_metrics' ; export async function getMetricsChartDataByAgent ( { environment , kuery , setup , serviceName , serviceNodeName , agentName , start , end , } ) { if ( isJavaAgentName ( agentName ) ) { return getJavaMetricsCharts ( { environment , kuery , setup , serviceName , serviceNodeName , start , end , } ) ; } return getDefaultMetricsCharts ( { environment , kuery , setup , serviceName , start , end , } ) ; }