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: add connectionInfo to telemetry calls, and connectionId to events COMPASS-7968 #5977

Merged
merged 24 commits into from
Jul 11, 2024

Conversation

paula-stacho
Copy link
Contributor

@paula-stacho paula-stacho commented Jun 26, 2024

Description

strategy

  • we only send connectionId, but pass the whole connectionInfo to telemetry to be more future-ready
  • if available, ConnectionInfoAccess is used
  • otherwise, ConnectionRepository is used - this would be mainly for these plugins
    <ImportPlugin></ImportPlugin>
    <ExportPlugin></ExportPlugin>
    <CreateViewPlugin></CreateViewPlugin>
    <CreateNamespacePlugin></CreateNamespacePlugin>
    <DropNamespacePlugin></DropNamespacePlugin>
    <RenameCollectionPlugin></RenameCollectionPlugin>

event plan

These are the events that I added connectionInfo to

  • 'Aggregation Canceled'
  • 'Aggregation Edited'
  • 'Aggregation Executed'
  • 'Aggregation Explained'
  • 'Aggregation Export Opened'
  • 'Aggregation Exported'
  • 'Aggregation Opened'
  • 'Aggregation Saved'
  • 'Aggregation Saved As View'
  • 'Aggregation Side Panel Opened'
  • 'Aggregation Timed Out'
  • 'Aggregation Use Case Added'
  • 'Aggregation Use Case Saved'
  • 'AI Prompt Submitted'
  • 'AI Query Feedback'
  • 'AI Response Failed'
  • 'AI Response Generated'
  • 'Bulk Delete Executed'
  • 'Bulk Delete Opened'
  • 'Bulk Update Executed'
  • 'Bulk Update Favorited'
  • 'Bulk Update Opened'
  • 'Collection Created'
  • 'Connection Attempt'
  • 'Connection Failed'
  • 'CurrentOp showOperationDetails'
  • 'Database Created'
  • 'Delete Export Opened'
  • 'Delete Exported'
  • 'DetailView hideOperationDetails'
  • 'DetailView killOp'
  • 'Document Cloned'
  • 'Document Copied'
  • 'Document Deleted'
  • 'Document Inserted'
  • 'Document Updated'
  • 'Editor Type Changed'
  • 'Explain Plan Executed'
  • 'Export Completed'
  • 'Export Opened'
  • 'Query Edited'
  • 'Query Executed'
  • 'Query Export Opened'
  • 'Query Exported'
  • 'Query History Closed'
  • 'Query History Favorite Added'
  • 'Query History Favorites'
  • 'Query History Opened'
  • 'Query History Recent'
  • 'Query History Recent Used'
  • 'Query Results Refreshed'
  • 'Import Completed'
  • 'Import Error Log Opened'
  • 'Import Opened'
  • 'Index Create Opened'
  • 'Index Created'
  • 'Index Dropped'
  • 'Index Edited'
  • 'New Connection'
  • 'Performance Advisor Clicked'
  • 'Performance Paused'
  • 'Performance Resumed'
  • 'PipelineAI Feedback'
  • 'Schema Analyzed'
  • 'Schema Validation Added'
  • 'Schema Validation Edited'
  • 'Schema Validation Updated'
  • Shell ${string}
  • 'Switch View Type'
  • 'Update Export Opened'
  • 'Update Exported'
  • 'View Updated'
  • 'Focus Mode Closed'
  • 'Focus Mode Opened'

These have the connectionInfo sometimes

  • 'Query History Favorite Removed' - depends! this one can be from 'my_queries' or from 'documents' screen
  • 'Query History Favorite Used' - same
  • 'Aggregation Deleted' - same
  • 'Screen' - I have added connection_id to Screen events I encountered along the way + all non-modal Screens should have it. that means there might be modal Screen events that don't have connection_id. I can go through the rest, it's just extra work and I wasn't sure if it's necessary.

And these are general scope

  • 'Application Launched'
  • 'Application Restart Accepted'
  • 'Atlas Link Clicked'
  • 'Atlas Sign In Error'
  • 'Atlas Sign In Success'
  • 'Atlas Sign Out'
  • 'Autoupdate Accepted'
  • 'Autoupdate Disabled'
  • 'Autoupdate Dismissed'
  • 'Autoupdate Enabled'
  • 'My Queries Filter'
  • 'My Queries Sort'
  • 'My Queries Search'
  • 'Theme Changed'
  • 'Error Fetching Attributes'
  • 'Query History Favorite Copied' - this is from 'my_queries' screen
  • 'Aggregation Copied'
  • 'First Contentful Paint'
  • 'Largest Contentful Paint'
  • 'First Input Delay'
  • 'Cumulative Layout Shift'
  • 'Time to First Byte'
  • 'Guide Cue Dismissed'
  • 'Guide Cue Group Dismissed'
  • 'Connection Exported' - this actually seems to be a bulk operation
  • 'Connection Imported' - same as above
  • 'Keytar Secrets Migration Failed'
  • 'Signal Action Button Clicked'
  • 'Signal Closed'
  • 'Signal Link Clicked'
  • 'Signal Opened'
  • 'Signal Shown'

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@paula-stacho paula-stacho changed the title Compass 7968 2 fix: add connectionInfo to telemetry COMPASS-7968 Jun 27, 2024
@github-actions github-actions bot added the fix label Jun 27, 2024
@paula-stacho paula-stacho changed the title fix: add connectionInfo to telemetry COMPASS-7968 fix: add connectionInfo to telemetry calls, and connectionId to events COMPASS-7968 Jun 28, 2024
@paula-stacho paula-stacho added the no release notes Fix or feature not for release notes label Jun 28, 2024
@paula-stacho paula-stacho marked this pull request as ready for review June 28, 2024 12:34
Copy link
Contributor

@himanshusinghs himanshusinghs 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. I left a few small suggestions and question.

@paula-stacho paula-stacho force-pushed the COMPASS-7968-2 branch 2 times, most recently from 4ecb511 to cef73cb Compare July 10, 2024 14:10
@paula-stacho paula-stacho merged commit e5637dc into main Jul 11, 2024
30 checks passed
@paula-stacho paula-stacho deleted the COMPASS-7968-2 branch July 11, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix no release notes Fix or feature not for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants