Skip to content

Commit 1a8fae4

Browse files
authored
chore(compass-schema): add tracking for schema advisor COMPASS-7734 (#5580)
add tracking
1 parent eaf0b86 commit 1a8fae4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/compass-schema/src/components/compass-schema.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import type { configureActions } from '../actions';
3434
import { usePreference } from 'compass-preferences-model/provider';
3535
import { useConnectionInfo } from '@mongodb-js/connection-storage/provider';
3636
import { getAtlasPerformanceAdvisorLink } from '../utils';
37+
import { useLoggerAndTelemetry } from '@mongodb-js/compass-logging/provider';
3738

3839
const rootStyles = css({
3940
width: '100%',
@@ -336,6 +337,7 @@ const nbsp = '\u00a0';
336337
const title = 'Atlas’ Performance Advisor.';
337338
const PerformanceAdvisorBanner = () => {
338339
const { atlasMetadata } = useConnectionInfo();
340+
const { track } = useLoggerAndTelemetry('COMPASS-SCHEMA');
339341
return (
340342
<Banner variant="info">
341343
<Body weight="medium">Looking for schema anti-patterns?</Body>
@@ -348,6 +350,7 @@ const PerformanceAdvisorBanner = () => {
348350
{atlasMetadata ? (
349351
<Link
350352
href={getAtlasPerformanceAdvisorLink(atlasMetadata)}
353+
onClick={() => track('Performance Advisor Clicked')}
351354
hideExternalIcon
352355
>
353356
{title}

0 commit comments

Comments
 (0)