diff --git a/public/components/trace_analytics/home.tsx b/public/components/trace_analytics/home.tsx index 5bb98bbea2..da691d9cf5 100644 --- a/public/components/trace_analytics/home.tsx +++ b/public/components/trace_analytics/home.tsx @@ -120,7 +120,13 @@ export const Home = (props: HomeProps) => { const [dataSourceMDSId, setDataSourceMDSId] = useState([{ id: '', label: '' }]); const [currentSelectedService, setCurrentSelectedService] = useState(''); - const { defaultRoute = '/services' } = props; + let defaultRoute = props.defaultRoute ?? '/services'; + const currentHash = window.location.hash.split('#')[1] || ''; + + if (currentHash === '/traces' || currentHash === '/services') { + defaultRoute = currentHash; + } + const { chrome } = props; const isNavGroupEnabled = chrome.navGroup.getNavGroupEnabled(); diff --git a/public/components/trace_analytics/trace_side_nav.tsx b/public/components/trace_analytics/trace_side_nav.tsx index de1a346d43..1691c5b51c 100644 --- a/public/components/trace_analytics/trace_side_nav.tsx +++ b/public/components/trace_analytics/trace_side_nav.tsx @@ -30,7 +30,7 @@ export function TraceSideBar(props: { children: React.ReactNode }) { { name: 'Trace analytics', id: 1, - href: '#/', + href: '#/services', items: [ { name: 'Services',