File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33import * as vscode from 'vscode' ;
4+ import { IAggregateConfiguration } from '../configuration' ;
45import { IFeature } from '../feature' ;
5- import { ILogger } from '../logging ' ;
6+ import { ConnectionHandler } from '../handler ' ;
67import { ConnectionStatus } from '../interfaces' ;
8+ import { ILogger } from '../logging' ;
79import * as messages from '../messages' ;
8- import { ConnectionHandler } from '../handler' ;
9- import { IAggregateConfiguration } from '../configuration' ;
10+ import { reporter } from '../telemetry' ;
1011
1112class RequestParams implements messages . PuppetFixDiagnosticErrorsRequestParams {
1213 documentUri : string ;
@@ -32,6 +33,10 @@ class FormatDocumentProvider {
3233 return [ ] ;
3334 }
3435
36+ if ( reporter ) {
37+ reporter . sendTelemetryEvent ( 'puppet/FormatDocument' ) ;
38+ }
39+
3540 const requestParams = new RequestParams ( ) ;
3641 requestParams . documentUri = document . uri . toString ( false ) ;
3742 requestParams . alwaysReturnContent = false ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { getLocation } from 'jsonc-parser';
22import * as vscode from 'vscode' ;
33import { IFeature } from '../feature' ;
44import { ILogger } from '../logging' ;
5+ import { reporter } from '../telemetry' ;
56
67export class PuppetModuleHoverFeature implements IFeature {
78 constructor ( public context : vscode . ExtensionContext , public logger : ILogger ) {
@@ -37,6 +38,10 @@ export class PuppetModuleHoverProvider implements vscode.HoverProvider {
3738 return ;
3839 }
3940
41+ if ( reporter ) {
42+ reporter . sendTelemetryEvent ( 'metadataJSON/Hover' ) ;
43+ }
44+
4045 const range = document . getWordRangeAtPosition ( position ) ;
4146 const word = document . getText ( range ) ;
4247
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import axios from 'axios';
33import * as vscode from 'vscode' ;
44import { IFeature } from '../feature' ;
55import { ILogger } from '../logging' ;
6+ import { reporter } from '../telemetry' ;
67
78interface PuppetForgeModuleInfo {
89 uri : string ;
@@ -38,6 +39,10 @@ class PuppetfileHoverProvider implements vscode.HoverProvider {
3839 return null ;
3940 }
4041
42+ if ( reporter ) {
43+ reporter . sendTelemetryEvent ( 'puppetfile/Hover' ) ;
44+ }
45+
4146 const text = line . text
4247 . replace ( new RegExp ( 'mod\\s+' ) , '' )
4348 . replace ( new RegExp ( ",\\s+'\\d.\\d.\\d\\'" ) , '' )
You can’t perform that action at this time.
0 commit comments