Skip to content

fix(compass-data-modeling): add telemetry for diagram created COMPASS-9525 #7090

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

Merged
merged 4 commits into from
Jul 7, 2025

Conversation

paula-stacho
Copy link
Contributor

@paula-stacho paula-stacho commented Jul 3, 2025

Adds Data Modeling Diagram Created event

@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 15:17
@paula-stacho paula-stacho requested a review from a team as a code owner July 3, 2025 15:17
@github-actions github-actions bot added the fix label Jul 3, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds telemetry support for when a data modeling diagram is created in Compass.

  • Introduces a new DataModelingDiagramCreated event type in the telemetry schema.
  • Tracks the “Data Modeling Diagram Created” event (with collection count) in the analysis process.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/compass-telemetry/src/telemetry-events.ts Added DataModelingDiagramCreated event type and union
packages/compass-data-modeling/src/store/analysis-process.ts Emitted telemetry event in startAnalysis
Comments suppressed due to low confidence (2)

packages/compass-telemetry/src/telemetry-events.ts:2879

  • [nitpick] Add a JSDoc comment above this type to explain when the DataModelingDiagramCreated event is dispatched and clarify the num_collections payload.
type DataModelingDiagramCreated = CommonEvent<{

packages/compass-data-modeling/src/store/analysis-process.ts:208

  • Add a unit test for startAnalysis that spies on services.track and asserts it's called with the "Data Modeling Diagram Created" event and correct num_collections value.
      services.track('Data Modeling Diagram Created', {

@paula-stacho paula-stacho added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Jul 3, 2025
Comment on lines 2878 to 2884

type DataModelingDiagramCreated = CommonEvent<{
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want to add the @category to this event as well, so that it shows up in tracking plan something like this or else it would land on Other events

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mabaasit !

@paula-stacho paula-stacho merged commit 30e95af into main Jul 7, 2025
55 of 58 checks passed
@paula-stacho paula-stacho deleted the COMPASS-9525 branch July 7, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature flagged PRs labeled with this label will not be included in the release notes of the next release fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants