mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-21 17:36:37 +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(() => {
|
useEffect(() => {
|
||||||
logEvent(MetricsExplorerEvents.TabChanged, {
|
logEvent(MetricsExplorerEvents.TabChanged, {
|
||||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
[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
|
// This is used to avoid the filters from being serialized with the id
|
||||||
const queryFiltersWithoutId = useMemo(() => {
|
const queryFiltersWithoutId = useMemo(() => {
|
||||||
const filtersWithoutId = {
|
const filtersWithoutId = {
|
||||||
@ -168,9 +167,11 @@ function Summary(): JSX.Element {
|
|||||||
[SUMMARY_FILTERS_KEY]: JSON.stringify(value),
|
[SUMMARY_FILTERS_KEY]: JSON.stringify(value),
|
||||||
});
|
});
|
||||||
setCurrentPage(1);
|
setCurrentPage(1);
|
||||||
logEvent(MetricsExplorerEvents.FilterApplied, {
|
if (value.items.length > 0) {
|
||||||
[MetricsExplorerEventKeys.Tab]: 'summary',
|
logEvent(MetricsExplorerEvents.FilterApplied, {
|
||||||
});
|
[MetricsExplorerEventKeys.Tab]: 'summary',
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[setSearchParams, searchParams],
|
[setSearchParams, searchParams],
|
||||||
);
|
);
|
||||||
|
|||||||
@ -6,7 +6,6 @@ export enum MetricsExplorerEvents {
|
|||||||
ModalOpened = 'Metrics Explorer: Modal opened',
|
ModalOpened = 'Metrics Explorer: Modal opened',
|
||||||
MetricClicked = 'Metrics Explorer: Metric clicked',
|
MetricClicked = 'Metrics Explorer: Metric clicked',
|
||||||
FilterApplied = 'Metrics Explorer: Filter applied',
|
FilterApplied = 'Metrics Explorer: Filter applied',
|
||||||
TimeUpdated = 'Metrics Explorer: Time updated',
|
|
||||||
TreemapViewChanged = 'Metrics Explorer: Treemap view changed',
|
TreemapViewChanged = 'Metrics Explorer: Treemap view changed',
|
||||||
PageNumberChanged = 'Metrics Explorer: Page number changed',
|
PageNumberChanged = 'Metrics Explorer: Page number changed',
|
||||||
PageSizeChanged = 'Metrics Explorer: Page size changed',
|
PageSizeChanged = 'Metrics Explorer: Page size changed',
|
||||||
@ -48,4 +47,5 @@ export enum MetricsExplorerEventKeys {
|
|||||||
YAxisUnit = 'yAxisUnit',
|
YAxisUnit = 'yAxisUnit',
|
||||||
ViewName = 'viewName',
|
ViewName = 'viewName',
|
||||||
Filters = 'filters',
|
Filters = 'filters',
|
||||||
|
TimeRange = 'timeRange',
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user