Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: startupTime telemetry metrics for apex debugger & replay debugger #5341

Merged
merged 5 commits into from
Jan 19, 2024

Conversation

mingxuanzhangsfdx
Copy link
Member

What does this PR do?

startupTime was not a metrics in apex debugger & replay debugger, which makes it impossible to measure in the two extensions. This PR makes startupTime a measurement so we are able to view the metrics in azure appinsights.

What issues does this PR fix or reference?

@W-14834514@

Functionality Before

startupTime in apex debugger & replay debugger is not a log metrics.

Functionality After

startupTime in apex debugger & replay debugger is a log metrics.

Copy link
Contributor

@CristiCanizales CristiCanizales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this fix Mingxuan!

:shipit:

@@ -52,8 +57,8 @@ export class TelemetryService {
}
}

private getEndHRTime(hrstart: [number, number]): string {
private getEndHRTime(hrstart: [number, number]): number {
Copy link
Collaborator

@diyer diyer Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this change do and what impact does it have on telemetry?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this the root cause of the issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public sendTelemetryEvent( eventName: string, properties?: { [key: string]: string }, measurements?: { [key: string]: number } ): void

startupTime should be passed in via measurements, so that it can be viewed as a log metrics. So I need to change the function to return a number type. So measurements has a parameter like this:
{ 'startupTime': 1 }

@diyer
Copy link
Collaborator

diyer commented Jan 17, 2024

Thanks Mingxuan! How can this be tested locally?

@mingxuanzhangsfdx
Copy link
Member Author

Thanks Mingxuan! How can this be tested locally?

@diyer We run extensions with the change, and we should be able to see the metrics on azure after a while, which means when we specify the metrics startupTime and we set up the filter for extensionName, apex debugger & replay debugger shows up. I will do that after training.

@mingxuanzhangsfdx mingxuanzhangsfdx changed the title Mz/activation telemetry fix fix: startupTime telemetry metrics for apex debugger & replay debugger Jan 18, 2024
@mingxuanzhangsfdx mingxuanzhangsfdx merged commit 555c0a7 into develop Jan 19, 2024
12 checks passed
@mingxuanzhangsfdx mingxuanzhangsfdx deleted the mz/activation-telemetry-fix branch January 19, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants