diff --git a/public/components/trace_analytics/components/common/legacy_route_helpers.ts b/public/components/trace_analytics/components/common/legacy_route_helpers.ts index 139456bf5..3be7bfbf0 100644 --- a/public/components/trace_analytics/components/common/legacy_route_helpers.ts +++ b/public/components/trace_analytics/components/common/legacy_route_helpers.ts @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { observabilityID } from "../../../../../common/constants/shared"; +import { observabilityTracesID } from '../../../../../common/constants/shared'; -export const convertLegacyTraceAnalyticsUrl = (location: Location)=> { - const pathname = location.pathname.replace('trace-analytics-dashboards', observabilityID); - const hash = `#/trace_analytics${location.hash.replace(/^#/, '/home')}${ +export const convertLegacyTraceAnalyticsUrl = (location: Location) => { + const pathname = location.pathname.replace('trace-analytics-dashboards', observabilityTracesID); + const hash = `${location.hash}${ location.hash.includes('?') ? location.search.replace(/^\?/, '&') : location.search }`; return pathname + hash;