mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-17 15:36:48 +00:00
chore: fix metrics explorer events (#8411)
This commit is contained in:
parent
b1864ee328
commit
26d55875f5
@ -75,15 +75,14 @@ function Summary(): JSX.Element {
|
||||
useEffect(() => {
|
||||
logEvent(MetricsExplorerEvents.TabChanged, {
|
||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
||||
[MetricsExplorerEventKeys.TimeRange]: {
|
||||
startTime: convertNanoToMilliseconds(minTime),
|
||||
endTime: convertNanoToMilliseconds(maxTime),
|
||||
},
|
||||
});
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
logEvent(MetricsExplorerEvents.TimeUpdated, {
|
||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
||||
});
|
||||
}, [maxTime, minTime]);
|
||||
|
||||
// This is used to avoid the filters from being serialized with the id
|
||||
const queryFiltersWithoutId = useMemo(() => {
|
||||
const filtersWithoutId = {
|
||||
@ -168,9 +167,11 @@ function Summary(): JSX.Element {
|
||||
[SUMMARY_FILTERS_KEY]: JSON.stringify(value),
|
||||
});
|
||||
setCurrentPage(1);
|
||||
logEvent(MetricsExplorerEvents.FilterApplied, {
|
||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
||||
});
|
||||
if (value.items.length > 0) {
|
||||
logEvent(MetricsExplorerEvents.FilterApplied, {
|
||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
||||
});
|
||||
}
|
||||
},
|
||||
[setSearchParams, searchParams],
|
||||
);
|
||||
|
||||
@ -6,7 +6,6 @@ export enum MetricsExplorerEvents {
|
||||
ModalOpened = 'Metrics Explorer: Modal opened',
|
||||
MetricClicked = 'Metrics Explorer: Metric clicked',
|
||||
FilterApplied = 'Metrics Explorer: Filter applied',
|
||||
TimeUpdated = 'Metrics Explorer: Time updated',
|
||||
TreemapViewChanged = 'Metrics Explorer: Treemap view changed',
|
||||
PageNumberChanged = 'Metrics Explorer: Page number changed',
|
||||
PageSizeChanged = 'Metrics Explorer: Page size changed',
|
||||
@ -48,4 +47,5 @@ export enum MetricsExplorerEventKeys {
|
||||
YAxisUnit = 'yAxisUnit',
|
||||
ViewName = 'viewName',
|
||||
Filters = 'filters',
|
||||
TimeRange = 'timeRange',
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user