Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore: track from which page user visited to support page (#5168)

Yunus Mcf54b5f9ec5e
diff --git a/frontend/src/container/SideNav/SideNav.tsx b/frontend/src/container/SideNav/SideNav.tsx
index 3b35a75a81..6cec0448b2 100644
--- a/frontend/src/container/SideNav/SideNav.tsx
+++ b/frontend/src/container/SideNav/SideNav.tsx
@@ -209,7 +209,9 @@ function SideNav({
if (event && isCtrlMetaKey(event)) {
openInNewTab(`${key}?${queryString.join('&')}`);
} else {
- history.push(`${key}?${queryString.join('&')}`);
+ history.push(`${key}?${queryString.join('&')}`, {
+ from: pathname,
+ });
}
}
},
diff --git a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts
index 15bea36cba..cd39ba464c 100644
--- a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts
+++ b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts
@@ -75,7 +75,7 @@ const getHistogramSeries = ({
const legend = newLegend || lgd || '';
const label = isMergedSeries
- ? 'merged_series'
+ ? ''
: getLabelName(metric, queryName || '', legend);
const color = generateColor(label, themeColors.chartcolors);
diff --git a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
index 2c1040daf4..7a5cd64f88 100644
--- a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
+++ b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
@@ -70,7 +70,7 @@ const generateTooltipContent = (
const value = data[index][idx];
const dataIngested = quantity[idx];
const label = isMergedSeries
- ? 'merged_series'
+ ? ''
: getLabelName(metric, queryName || '', legend || '');
let color = generateColor(label, themeColors.chartcolors);
diff --git a/frontend/src/pages/Support/Support.tsx b/frontend/src/pages/Support/Support.tsx
index 96276507f9..2d156a3816 100644
--- a/frontend/src/pages/Support/Support.tsx
+++ b/frontend/src/pages/Support/Support.tsx
@@ -10,6 +10,8 @@ import {
MessageSquare,
Slack,
} from 'lucide-react';
+import { useEffect } from 'react';
+import { useHistory } from 'react-router-dom';
const { Title, Text } = Typography;
@@ -84,11 +86,24 @@ const supportChannels = [
export default function Support(): JSX.Element {
const { trackEvent } = useAnalytics();
+ const history = useHistory();
const handleChannelWithRedirects = (url: string): void => {
window.open(url, '_blank');
};
+ useEffect(() => {
+ if (history?.location?.state) {
+ const histroyState = history?.location?.state as any;
+
+ if (histroyState && histroyState?.from) {
+ trackEvent(`Support : From URL : ${histroyState.from}`);
+ }
+ }
+
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
const handleSlackConnectRequest = (): void => {
const recipient = '[email protected]';
const subject = 'Slack Connect Request';