File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,19 @@ import { FeatureConfigProvider } from '../service/featureConfigProvider'
4141export const toggleCodeSuggestions = Commands . declare (
4242 { id : 'aws.codeWhisperer.toggleCodeSuggestion' , compositeKey : { 1 : 'source' } } ,
4343 ( suggestionState : CodeSuggestionsState ) => async ( _ : VsCodeCommandArg , source : CodeWhispererSource ) => {
44- const isSuggestionsEnabled = await suggestionState . toggleSuggestions ( )
45- await vscode . commands . executeCommand ( 'aws.codeWhisperer.refresh' )
46- telemetry . aws_modifySetting . emit ( {
47- settingId : CodeWhispererConstants . autoSuggestionConfig . settingId ,
48- settingState : isSuggestionsEnabled
49- ? CodeWhispererConstants . autoSuggestionConfig . activated
50- : CodeWhispererConstants . autoSuggestionConfig . deactivated ,
44+ await telemetry . aws_modifySetting . run ( async span => {
45+ span . record ( {
46+ settingId : CodeWhispererConstants . autoSuggestionConfig . settingId ,
47+ } )
48+
49+ const isSuggestionsEnabled = await suggestionState . toggleSuggestions ( )
50+ span . record ( {
51+ settingState : isSuggestionsEnabled
52+ ? CodeWhispererConstants . autoSuggestionConfig . activated
53+ : CodeWhispererConstants . autoSuggestionConfig . deactivated ,
54+ } )
55+
56+ await vscode . commands . executeCommand ( 'aws.codeWhisperer.refresh' )
5157 } )
5258 }
5359)
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const validationExemptMetrics: Set<string> = new Set([
1919 'amazonq_isReviewedChanges' ,
2020 'apigateway_copyUrl' ,
2121 'aws_loadCredentials' ,
22- 'aws_modifySetting' ,
2322 'aws_validateCredentials' ,
2423 'cloudwatchlogs_download' ,
2524 'codeTransform_isDoubleClickedToTriggerInvalidProject' ,
You can’t perform that action at this time.
0 commit comments