Skip to content

Commit

Permalink
fix(explore): Temporarily disable analytics
Browse files Browse the repository at this point in the history
This is spamming analytics. Turn it off for now.
  • Loading branch information
Zylphrex committed Jan 9, 2025
1 parent 75fec36 commit 9fee458
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions static/app/views/explore/hooks/useAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {useEffect} from 'react';

import type {Confidence, Organization} from 'sentry/types/organization';
import {trackAnalytics} from 'sentry/utils/analytics';
// import {trackAnalytics} from 'sentry/utils/analytics';
import type {DiscoverDatasets} from 'sentry/utils/discover/types';
import type {UseApiQueryResult} from 'sentry/utils/queryClient';
import type RequestError from 'sentry/utils/requestError/requestError';
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
// import {MutableSearch} from 'sentry/utils/tokenizeSearch';
import type {Visualize} from 'sentry/views/explore/contexts/pageParamsContext/visualizes';
import {usePerformanceSubscriptionDetails} from 'sentry/views/performance/newTraceDetails/traceTypeWarnings/usePerformanceSubscriptionDetails';

Expand Down Expand Up @@ -44,26 +44,26 @@ export function useAnalytics({
return;
}

const search = new MutableSearch(userQuery);
const params = {
organization,
columns,
columns_count: columns.filter(Boolean).length,
confidences,
dataset,
query_status: resultStatus,
result_length: resultLength || 0,
result_missing_root: resultMissingRoot || 0,
result_mode: resultMode,
user_queries: search.formatString(),
user_queries_count: search.tokens.length,
visualizes,
visualizes_count: visualizes.length,
title,
has_exceeded_performance_usage_limit: hasExceededPerformanceUsageLimit,
};
// const search = new MutableSearch(userQuery);
// const params = {
// organization,
// columns,
// columns_count: columns.filter(Boolean).length,
// confidences,
// dataset,
// query_status: resultStatus,
// result_length: resultLength || 0,
// result_missing_root: resultMissingRoot || 0,
// result_mode: resultMode,
// user_queries: search.formatString(),
// user_queries_count: search.tokens.length,
// visualizes,
// visualizes_count: visualizes.length,
// title,
// has_exceeded_performance_usage_limit: hasExceededPerformanceUsageLimit,
// };

trackAnalytics('trace.explorer.metadata', params);
// trackAnalytics('trace.explorer.metadata', params);
}, [
organization,
resultLength,
Expand Down

0 comments on commit 9fee458

Please sign in to comment.