Skip to content

Emit telemetry for user interactions in the local results view#1976

Merged
robertbrignull merged 4 commits intomainfrom
robertbrignull/local_results_telemetry
Jan 18, 2023
Merged

Emit telemetry for user interactions in the local results view#1976
robertbrignull merged 4 commits intomainfrom
robertbrignull/local_results_telemetry

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

This PR adds telemetry for all UI interactions in the local results view.

We use the same telemetry message type that was used for the variant analysis results view, but we have to use a slightly different technique for sending the message when state changes. The local results view is not a modern react component and it uses setState rather than useState, which means we can't use useEffect here and instead have to add a call to the telemetry every time we call setState.

I've managed to trigger each of these telemetry events apart from local-results-show-raw-results. I can't quite work out the series of conditions that need to happen to be able to trigger this code. But I think if it ever does trigger then telemetry is reasonable.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested a review from a team January 17, 2023 15:58
@robertbrignull robertbrignull requested a review from a team as a code owner January 17, 2023 15:58
Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Nice!

The local results view should probably get an overhaul, but it's great that you were able to add telemetry without any major changes.

@robertbrignull robertbrignull merged commit 84c6c1e into main Jan 18, 2023
@robertbrignull robertbrignull deleted the robertbrignull/local_results_telemetry branch January 18, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants