import React from 'react' ; import { APMQueryParams } from '../url_helpers' ; import { APMLink , APMLinkExtendProps , useAPMHref } from './apm_link' ; const persistedFilters = [ 'host' , 'containerId' , 'podName' , 'serviceVersion' , ] ; export function useMetricOverviewHref ( serviceName ) { return useAPMHref ( { path : `/services/${ serviceName }/metrics` , persistedFilters , } ) ; } interface Props extends APMLinkExtendProps { serviceName : string ; } export function MetricOverviewLink ( { serviceName , ... rest } ) { return < APMLink path = { `/services/${ serviceName }/metrics` } { ... rest } />; }