Skip to content

Commit c972550

Browse files
alexr00Copilot
andauthored
Add telemetry for assignable users (#8690)
* Add telemetry for assignable users * Revert "Add telemetry for assignable users" This reverts commit 5d8a250. * thanks copilot Co-authored-by: Copilot <copilot@github.com> --------- Co-authored-by: Copilot <copilot@github.com>
1 parent 14ee92e commit c972550

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/github/githubRepository.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,21 @@ export class GitHubRepository extends Disposable {
15781578
after = users?.pageInfo.endCursor;
15791579
} catch (e) {
15801580
Logger.debug(`Unable to fetch assignable users: ${e}`, this.id);
1581+
const properties: { errorCode?: string; usedSuggestedActors: string } = {
1582+
usedSuggestedActors: String(!!schema.GetSuggestedActors),
1583+
};
1584+
if (e.status !== undefined) {
1585+
properties.errorCode = String(e.status);
1586+
} else if (e.graphQLErrors?.[0]?.extensions?.code) {
1587+
properties.errorCode = String(e.graphQLErrors[0].extensions.code);
1588+
}
1589+
/* __GDPR__
1590+
"pr.getAssignableUsersFailed" : {
1591+
"errorCode": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
1592+
"usedSuggestedActors": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
1593+
}
1594+
*/
1595+
this.telemetry.sendTelemetryErrorEvent('pr.getAssignableUsersFailed', properties);
15811596
if (
15821597
e.graphQLErrors &&
15831598
e.graphQLErrors.length > 0 &&

0 commit comments

Comments
 (0)