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

feat(insights): add analytics to database sample panel #70769

Merged
merged 6 commits into from
May 13, 2024

Conversation

KevinL10
Copy link
Contributor

@KevinL10 KevinL10 commented May 13, 2024

Adds analytics to the span sample panel to track:

  • How often the panels are opened
  • How often spans are clicked
  • How often “Try different samples” is clicked
  • How often filters are interacted with

This PR adds analytics to database only as a first step. I'll be adding analytics to the remaining modules in the next PR.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 13, 2024
Copy link

codecov bot commented May 13, 2024

Bundle Report

Changes will increase total bundle size by 2.94kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 26.77MB 2.94kB ⬆️

@KevinL10 KevinL10 changed the title feat(insights): add analytics to sample panel feat(insights): add analytics to database sample panel May 13, 2024
@KevinL10 KevinL10 marked this pull request as ready for review May 13, 2024 18:18
@KevinL10 KevinL10 requested a review from a team as a code owner May 13, 2024 18:18
Copy link
Contributor

@DominikB2014 DominikB2014 left a comment

Choose a reason for hiding this comment

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

Changes are looking good, but i'm curious about something!

Will we be able to gather stats relative to the amount of people that are on the page as well? Knowing the total amount of clicks on samples are helpful so we can compare between modules. But also knowing what proportion of people that enter a module arrive to a sample is also an interesting question to answer.

Answering this question directly might not be too feasible, but perhaps some other metric could help us with this!

@KevinL10
Copy link
Contributor Author

Agree it would be good to have proportion of module visits that arrive to at least 1 sample. For now, we have the total number of people who visit the module itself, so we have a rough estimate of the average # of sample panels opened per page visit. I'll see if there are any other similar metrics we can gather.

Copy link
Contributor

@DominikB2014 DominikB2014 left a comment

Choose a reason for hiding this comment

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

looking good overall! Feel free to address my comments as you see fit.

Personally i'm not a fan of adding a moduleName prop everywhere, it doesn't really dictate any difference in component behaviour and its used purely for analytics. We could consider determining the name from the URL. I'm cool if we think about this later too!

@@ -67,6 +68,7 @@ type Props = {
avg: number;
data: SpanTableRow[];
isLoading: boolean;
moduleName: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a moduleName type here, that we should probably use instead of string
https://github.com/getsentry/sentry/blob/master/static/app/views/starfish/types.tsx#L13
Although its missing a bunch of modules, so we could extend that.

Copy link
Member

Choose a reason for hiding this comment

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

+1 to this! If you add the missing modules to ModuleName and use ModuleName instead of strings that'd be great 👍🏻

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense 👍🏻 just needs to rely on ModuleName enum rather than plain strings

@@ -67,6 +68,7 @@ type Props = {
avg: number;
data: SpanTableRow[];
isLoading: boolean;
moduleName: string;
Copy link
Member

Choose a reason for hiding this comment

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

+1 to this! If you add the missing modules to ModuleName and use ModuleName instead of strings that'd be great 👍🏻

Copy link
Member

@narsaynorath narsaynorath left a comment

Choose a reason for hiding this comment

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

Nice, lgtm!

@KevinL10
Copy link
Contributor Author

thanks all! changed to ModuleName type and added the other modules. May consider inferring module from URL later on.

@KevinL10 KevinL10 merged commit 4a732da into master May 13, 2024
41 of 42 checks passed
@KevinL10 KevinL10 deleted the kevinliu/feat/sample-panel-analytics branch May 13, 2024 21:39
KevinL10 added a commit that referenced this pull request May 15, 2024
Continuation of #70769. Adds
analytics to the span sample panel to track:
- How often the panels are opened
- How often spans are clicked
- How often “Try different samples” is clicked
- How often specific filters are interacted with

Modules to add analytics to:
- [x] HTTP
- [x] Database
- [x] Cache
- [x] Queues
- [x] Screen Loads
- [x] App Starts
- [x] Resources

Note: Web Vitals does not have a sample panel

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
cmanallen pushed a commit that referenced this pull request May 21, 2024
Continuation of #70769. Adds
analytics to the span sample panel to track:
- How often the panels are opened
- How often spans are clicked
- How often “Try different samples” is clicked
- How often specific filters are interacted with

Modules to add analytics to:
- [x] HTTP
- [x] Database
- [x] Cache
- [x] Queues
- [x] Screen Loads
- [x] App Starts
- [x] Resources

Note: Web Vitals does not have a sample panel

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants