Skip to content

Commit f4726ae

Browse files
committed
(GH-588) Add server telemetry pass through
This commit adds a listener for telemetry events from the Language Server, and then sends them to the telemetry reporter.
1 parent 31dac58 commit f4726ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/handler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export abstract class ConnectionHandler {
5656
.onReady()
5757
.then(
5858
() => {
59+
this.languageClient.onTelemetry(event => {
60+
const eventName = event.Name ? event.Name : 'PUPPET_LANGUAGESERVER_EVENT';
61+
reporter.sendTelemetryEvent(eventName, event.Measurements, event.Properties);
62+
});
5963
this.setConnectionStatus('Loading Puppet', ConnectionStatus.Starting);
6064
this.queryLanguageServerStatusWithProgress();
6165
},

0 commit comments

Comments
 (0)