Skip to content

Commit

Permalink
Fix compiler errors
Browse files Browse the repository at this point in the history
Signed-off-by: Kingdon Barrett <[email protected]>
  • Loading branch information
Kingdon Barrett committed Sep 8, 2023
1 parent 17cb7e9 commit 2d64819
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/data/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export class Telemetry {
private reporter: TelemetryReporter;

constructor(context: ExtensionContext, extensionVersion: string, extensionId: string) {
// second and third arguments are no longer accepted by TelemetryReporter constructor
this.context = context;
const key = '9a491deb-120a-4a6e-8893-f528d4f6bd9c';
this.reporter = new TelemetryReporter(extensionId, extensionVersion, key);
this.reporter = new TelemetryReporter(key);
context.subscriptions.push(this.reporter);
}

Expand Down Expand Up @@ -88,7 +89,7 @@ export class Telemetry {
error = new Error(eventName);
}

this.reporter.sendTelemetryException(error, {
this.reporter.sendTelemetryEvent(String(error), {
name: eventName,
});

Expand Down
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function activate(context: ExtensionContext) {

globalState = new GlobalState(context);

// Note: the second and third arguments are thrown away
telemetry = new Telemetry(context, getExtensionVersion(), GitOpsExtensionConstants.ExtensionId);

initData();
Expand Down

0 comments on commit 2d64819

Please sign in to comment.