File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packages/compass-schema/src/components Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import type { configureActions } from '../actions';
3434import { usePreference } from 'compass-preferences-model/provider' ;
3535import { useConnectionInfo } from '@mongodb-js/connection-storage/provider' ;
3636import { getAtlasPerformanceAdvisorLink } from '../utils' ;
37+ import { useLoggerAndTelemetry } from '@mongodb-js/compass-logging/provider' ;
3738
3839const rootStyles = css ( {
3940 width : '100%' ,
@@ -336,6 +337,7 @@ const nbsp = '\u00a0';
336337const title = 'Atlas’ Performance Advisor.' ;
337338const 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 }
You can’t perform that action at this time.
0 commit comments