Code Insights Pings
Code Insights pings allow us to quantitatively measure the usage and success of Code Insights. This page is a source of truth for detailed explanations, statuses, and implementations of our pings.
We keep this docs page up to date because pings are a vital component of our product knowledge and prioritization process, and a broken or incorrect ping impacts 3-5 months of data (because that's how long a fix takes to propagate).
Terminology
- FE event - log events that we send by calling standard telemetry service on the frontend. These pings live only in the
event_logs
table. These typically represent user actions, such as hovers. - BE capture - pings that our BE sends to the ping store by checking/selecting data from database tables. Our backend periodically sends these pings to the
event_logs
table. These typically represent absolute counts across the entire instance.
Metrics
Additions count, edits count, and removals count
Type: FE event
Intended purpose: To track how many times customers have created, edited, and removed insights, by week.
Functional implementation: We track insight creating/editing/deleting events in the creation UI form and insight context menu component with standard telemetry service calls.
Other considerations: N/A
- Aggregation: By week
- Event Code: InsightAddition, InsightEdit, InsightRemoval
- PRs: #17805
- Version Added: 3.25
- Version(s) broken: 3.31-3.35.0 (does not count backend insights) (fix PR)
Hovers count
Type: FE event
Intended purpose: To track how many times users hover over a datapoint to see the tooltip on the graph, or "dig in" to the information.
Functional implementation: This ping works by firing an event on the client when a user hovers over a datapoint on a code insight.
Other considerations: N/A
- Aggregation: By week
- Event Code: InsightHover
- PRs: #17805
- Version Added: 3.25
UI customizations count
Type: FE event
Intended purpose: To track how many times users resize the insight graphs.
Functional implementation: This ping works by firing an event on the client when a user resizes a Code Insights graph on the page.
Other considerations: N/A
- Aggregation: By week
- Event Code: InsightUICustomization
- PRs: #17805
- Version Added: 3.25
Data point clicks count
Type: FE event
Intended purpose: To track how many times users click a datapoint to get to a diff search.
Functional implementation: This ping works by firing an event on the client when a user clicks an individual data point of an insight graph, which takes them to a diff search.
Other considerations: Because this functionality does not yet exist for backend insights, it only tracks clicks on frontend insights.
- Aggregation: By week
- Event Code: InsightDataPointClick
- PRs: #17805
- Version Added: 3.25
Page views count
Type: FE event
Intended purpose: To track how many times users view insights pages.
Functional implementation: This ping works by firing an event on the client when a user views any /insights page, whether it's creating or viewing insights.
Other considerations: As we add new insights pages it's important to make sure we're adding pages to this counter.
- Aggregation: By week
- Event Code: ViewInsights, StandaloneInsightPageViewed
- PRs: #17805
- Version Added: 3.25
- Version(s) broken: 3.25-3.26 (not weekly)(fix PR), 3.30 (broken when switching to dashboard pages, didn't track dashboard views)(fix PR)
Unique page views count
Type: FE event
Intended purpose: To track how many unique users are viewing insights pages each week.
Functional implementation: This ping works by firing an event on the client when a unique user views any /insights page for the first time that week, whether it's creating or viewing insights.
Other considerations: As we add new insights pages it's important to make sure we're adding pages to this counter.
- Aggregation: By week
- Event Code: InsightsUniquePageView
- PRs: #17805
- Version Added: 3.25
- Version(s) broken: 3.25-3.26 (not weekly)(fix PR), 3.30 (broken when switching to dashboard pages, didn't track dashboard views)(fix PR)
Standalone insights page filters edits count
Type: FE event
Intended purpose: To track how many users actively re-filter insights through the standalone insight page's filter panel.
Functional implementation: This ping works by firing a telemetry event on the client when a user changes insights filters (include/exclude repository regexp, search context, etc).
Other considerations: N/A
- Aggregation: By week
- Event Code: InsightFiltersChange
- PRs: #37521
- Version Added: 3.41
Standalone insights page dashboard clicks count
Type: FE event
Intended purpose: To track how many users are discovering dashboards from this page.
Functional implementation: This ping works by firing a telemetry event on the client when a user clicks any dashboard pills on the standalone insight page.
Other considerations: N/A
- Aggregation: By week
- Event Code: StandaloneInsightDashboardClick
- PRs: #37521
- Version Added: 3.41
Standalone insights page edit button clicks count
Type: FE event
Intended purpose: To track how many users are going to the edit page through the standalone insight page.
Functional implementation: This ping works by firing a telemetry event on the client when a user clicks on the edit button on the standalone insight page.
Other considerations: N/A
- Aggregation: By week
- Event Code: StandaloneInsightPageEditClick
- PRs: #37521
- Version Added: 3.41
In-product landing page events (hover, data points click, template section clicks)
Type: FE events
Intended purpose: To track unique users' activity on the in-product (get started insights) and the cloud landing pages.
Other considerations: N/A.
- Aggregation: By week
- Event Codes:
- InsightsGetStartedPage to track how many unique users are viewing get started page
- InsightsGetStartedPageQueryModification to track how many users change their live insight example query field value
- InsightsGetStartedPageRepositoriesModification to track how many users change their live insight example repositories field value
- InsightsGetStartedPrimaryCTAClick to track how many users click "Create your first insight" (call to action) button
- InsightsGetStartedTabClick to track how many users browse different template tabs on the in-product landing page, it sends selected tab
title
in event's payload data. - InsightGetStartedTemplateClick to track how many users click on the explore/use template button.
- InsightsGetStartedTabMoreClick to track how many users expand to full template section, it sends selected tab
title
in event's payload data. - InsightsGetStartedDocsClicks to track clicks over the in-product page's documentation links.
- PRs: #31048
- Version Added: 3.37
Org-visible insights count (Total)
Type: BE capture
Intended purpose: To track how many insights are visible by more than just the creator of the insight.
Functional implementation: we gather this on the backend by joining the insight_view
and insight_view_grants
tables and counting the insights with org level grants.
Other considerations: N/A
- Aggregation: total time, by insight type
- Event Code: InsightOrgVisible
- PRs: #21671
- Version Added: 3.29
- Version(s) broken: 3.31-3.35.0 (doesn't handle backend insights) fix PR
First time insight creators count
Type: FE event
Intended purpose: To track the week and count of the first time a user(s) creates a code insight, of any type, on an instance. The sum of first time insight creators count over all time is equal to the total number of unique creators who have made an insight.
Functional implementation: This metric queries the insight table for new addition events, then filters by unique IDs that appeared for the first time that week.
Other considerations: TODO does this ping include creators who create via the API?
- Aggregation: By week
- Event Code: WeeklyFirstTimeInsightCreators
- Version Added: 3.25
- Version(s) broken: 3.31-3.35.0 (doesn't handle backend insights, other bugs)
Total count of insights grouped by step size (days)
Type: BE capture
Intended purpose: To track the x-axis (time window) set by users on frontend insights, to help prioritize features related to setting time windows.
Functional implementation: this metric runs on the backend over all the insights.
Other considerations: N/A
- Aggregation: total
- Event Code: InsightTimeIntervals
- Version added: 3.29
- Version(s) broken: 3.31-3.35.0 fix PR
Code Insights View/Click Creation Funnels
Type: FE event
Intended purpose: These pings allow us to both understand how the view/click/view/click conversion funnel works for the creation flows of all existing types of insights, as well as smell-check other pings. The reason we use both "view" and "button clicks" in this funnel is that it's possible to view a page without "funneling through" via the prior page's CTA (for example: you can reach the creation/edit screen by the "edit" button, which does not involve logging a click on the "create search insight" button).
Functional implementation: These events fire on the frontend when the user takes the below actions.
Other considerations:
- Aggregation: By week
- Event Code:
- For the "search insight" funnel: (1) ViewCodeInsightsCreationPage, (2) CodeInsightCreateSearchBasedInsightClick, (3) ViewSearchBasedCreationPage, (4.1) SearchBasedCreationPageSubmitClick OR (4.2) SearchBasedCreationPageCancelClick
- For the "language stats insight" funnel: (1) ViewCodeInsightsCreationPage, (2) CodeInsightsCreateCodeStatsInsightClick, (3) ViewCodeInsightsCodeStatsCreationPage, (4.1) CodeInsightsCodeStatsCreationPageSubmitClick OR (4.2) CodeInsightsCodeStatsCreationPageCancelClick
- For the "extensions insight" funnel: (1) ViewCodeInsightsCreationPage, (2) CodeInsightsExploreInsightExtensionsClick.
- Version added: 3.29
View series counts
Type: BE capture
Intended purpose: To track the number of view series, grouped by presentation type and generation method. Note: a "view series" differs from a "series" by being attached to a particular insight. A series can be attached to more than one insight.
Functional implementation: This is calculated by joining the insight_series
, insight_view_series
, and insight_view
tables.
Other considerations: N/A
- Aggregation: total
- Event Code: ViewSeriesCounts
- Version added: 3.34
Series counts
Type: BE capture
Intended purpose: To track the number of series, grouped by generation method.
Functional implementation: This is calculated using the insight_series
table.
Other considerations: N/A
- Aggregation: total
- Event Code: SeriesCounts
- Version added: 3.34
View counts
Type: BE capture
Intended purpose: To track the number of insight views, grouped by presentation type.
Functional implementation: This is calculated using the insight_view
table. Unlike critical telemetry which only shows the number of unlocked insights for customers without full access, this ping shows the total number that are locked or unlocked (and may have been created during a trial or free beta phase).
Other considerations: N/A
- Aggregation: total
- Event Code: ViewCounts
- Version added: 3.34
Total orgs with dashboards
Type: BE capture
Intended purpose: To track the number of orgs with at least one dashboard.
Functional implementation: This is calculated using the dashboard_grants
table.
Other considerations: N/A
- Aggregation: total
- Event Code: TotalOrgsWithDashboard
- Version added: 3.38
Total dashboard count
Type: BE capture
Intended purpose: To track the total number of dashboards.
Functional implementation: This is calculated using the dashboard
table.
Other considerations: N/A
- Aggregation: total
- Event Code: TotalDashboardCount
- Version added: 3.38
Insights per dashboard
Type: BE capture
Intended purpose: To track statistics (average, min, max, median, std dev,) about how many insights are on each dashboard.
Functional implementation: These are calculated using the dashboard_insight_view
table.
Other considerations: N/A
- Aggregation: total
- Event Code: InsightsPerDashboard
- Version added: 3.38
Series backfill time
Type: BE capture
Intended purpose: To track how long on average it takes series to backfill.
Functional implementation: Exposes aggregate information using the backfill times found on insight_series
.
Other considerations: N/A
- Aggregation: weekly
- Event Code: WeeklySeriesBackfillTime
- Version added: 4.1
Search results aggregations metrics
Information icon hovers
Type: FE event
Intended purpose: To track interest in the feature.
Functional implementation: This ping works by firing a telemetry evente on the client when a user hovers over the information icon.
- Aggregation: weekly
- Event Code: WeeklyGroupResultsInfoIconHover
- Version added: 4.0 (#40977)
Sidebar and expanded view events
Type: FE event
Intended purpose: To track how users are using the different aggregation UI modes.
Functional implementation: These pings work by firing telemetry events on the client when a user expands or collapses the sidebar or full view panel.
Other considerations: For the expanded UI mode events we record which aggregation mode was toggled.
- Aggregation: weekly
- Event Codes:
- Version added: 4.0 (#40977)
Aggregation modes clicks and hovers
Type: FE event
Intended purpose: To track aggregation mode usage and interest.
Functional implementation: These pings work by firing telemetry events on the client when a user clicks on a mode or hovers over a disabled mode.
Other considerations: The ping also includes data for current UI mode.
- Aggregation: weekly
- Event Codes:
- Version added: 4.0 (#40997)
Aggregation chart clicks and hovers
Type: FE event
Intended purpose: To track if users are hovering over results and clicking through.
Functional implementation: These pings work by firing telemetry events on the client when a user hovers or clicks on a result.
Other considerations: The ping also includes data for the current UI mode and aggregation mode.
- Aggregation: weekly
- Event Codes:
- Version added: 4.0 (#40977)
Search mode (proactive/extended) success rate
Type: FE event
Intended purpose: To track the number of aggregation searches that succeed or hit limit in either a proactive or extended search.
Functional implementation: These pings fire a telemetry event when an aggregation search completes or times out.
- Aggregation: weekly
- Event Code: WeeklyGroupResultsSearches
- Version added: 4.1 (#42554)