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(sanity): add telemetry for versions #7460

Merged
merged 14 commits into from
Sep 4, 2024
Merged

feat(sanity): add telemetry for versions #7460

merged 14 commits into from
Sep 4, 2024

Conversation

RitaDias
Copy link
Contributor

@RitaDias RitaDias commented Sep 3, 2024

Description

Added telemetry to the following actions + fixed issue when adding a version to release made the code that came after the createVersionSuccess not run (wrong id was being passed)

Bundle

  • Bundle Created,
  • Bundle Updated,
  • Bundle Deleted,
  • Bundle Published,
  • Bundle Archived,
  • Bundle Unarchived

Version

  • All Versions created
  • Version created from draft (waiting confirmation)
  • Version created from version (waiting confirmation)

Draft

Out of scope (separate stories have been created):

  • Bundle scheduled
  • Bundle Unscheduled

What to review

Does this make sense? Should the messages be different?

Copy link

vercel bot commented Sep 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:15am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:15am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:15am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:15am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:15am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Sep 4, 2024 11:15am

Copy link
Contributor

github-actions bot commented Sep 3, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Sep 3, 2024

Component Testing Report Updated Sep 4, 2024 11:20 AM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 48s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 32s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 37s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 47s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 49s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 18s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 37s 12 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@@ -328,6 +328,10 @@ export const DocumentPaneProvider = memo((props: DocumentPaneProviderProps) => {
})

patchRef.current = (event: PatchEvent) => {
// when creating a new draft
if (!editState.draft && !editState.published && !editState.version) {
Copy link
Contributor Author

@RitaDias RitaDias Sep 3, 2024

Choose a reason for hiding this comment

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

The first section !editState.draft && !editState.published is going to disappear because it's being pushed to next #7459

@RitaDias RitaDias marked this pull request as ready for review September 3, 2024 14:15
@RitaDias RitaDias requested review from a team as code owners September 3, 2024 14:15
@RitaDias RitaDias requested review from cngonzalez and a team and removed request for a team and cngonzalez September 3, 2024 14:15
@@ -56,6 +59,9 @@ export function BundleDetailsDialog(props: BundleDetailsDialogProps): JSX.Elemen
await submit(submitValue)
if (formAction === 'create') {
setPerspective(value._id)
telemetry.log(CreatedRelease)
Copy link
Member

Choose a reason for hiding this comment

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

A thought here, though I'm unsure if this does or doesn't align with our current telemetry strategies elsewhere. But interested in your thoughts - tracking how/where a release is created eg. from the global perspective menu or from within the releases plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's true that might be interesting to know 💡
I'll add it! Thank you for the idea Jordan, great catch!

Copy link
Contributor Author

@RitaDias RitaDias Sep 4, 2024

Choose a reason for hiding this comment

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

Added it on 64bf480

I kept the terms as origin: 'structure' | 'release-plugin' because we know that the section where we create releases from the structure tool will likely change where it is (and might not end up in the nav bar as is now) and kept the name simple as release-plugin because I don't think we'll have multiple places where we'll be able to create the release within the plugin (nor do I know if we need that sort of granularity) + with the re-design it might not be in the "overview" :)

Thoughts are welcome!

@pedrobonamin
Copy link
Contributor

Added @sanity-io/growth as reviewers, having their early feedback will be appreciated

Copy link
Member

@jordanl17 jordanl17 left a comment

Choose a reason for hiding this comment

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

Great to have this added to corel, @RitaDias

Copy link
Contributor

@pedrobonamin pedrobonamin left a comment

Choose a reason for hiding this comment

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

Thanks for going through this and adding all the details. Great work @RitaDias !
I think we can merge it to Corel so it doesn't get merge conflicts later and in the meanwhile share it with growth to get their eyes. But not necessary to wait for their approval to merge it to Corel

@RitaDias RitaDias merged commit b5635f3 into corel Sep 4, 2024
42 checks passed
@RitaDias RitaDias deleted the corel-141-2 branch September 4, 2024 12:10
RitaDias added a commit that referenced this pull request Oct 3, 2024
* fix(sanity): issue where the createVersionSuccess was never resolving

* feat(sanity): add telemetry when adding version

* refactor(sanity): rename bundles to releases telemetry

* feat(sanity): add telemetry when creating release

* feat(sanity): add telemetry when updating release

* feat(sanity): add telemetry when deleting release

* feat(sanity): add telemetry when publishing release

* feat(sanity): add telemetry when archive and unarchive release

* chore(sanity): fix dependencies

* feat(sanity): add telemetry when creating a draft

* refactor(sanity): add telemetry for tracking drafts and include version

* refactor(sanity): update telemetry request for creating release

* refactor(sanity): reuse interface for OriginInfo

* docs(sanity): clarify unarchive / archive telemetry track
juice49 pushed a commit that referenced this pull request Oct 4, 2024
* fix(sanity): issue where the createVersionSuccess was never resolving

* feat(sanity): add telemetry when adding version

* refactor(sanity): rename bundles to releases telemetry

* feat(sanity): add telemetry when creating release

* feat(sanity): add telemetry when updating release

* feat(sanity): add telemetry when deleting release

* feat(sanity): add telemetry when publishing release

* feat(sanity): add telemetry when archive and unarchive release

* chore(sanity): fix dependencies

* feat(sanity): add telemetry when creating a draft

* refactor(sanity): add telemetry for tracking drafts and include version

* refactor(sanity): update telemetry request for creating release

* refactor(sanity): reuse interface for OriginInfo

* docs(sanity): clarify unarchive / archive telemetry track
juice49 pushed a commit that referenced this pull request Oct 7, 2024
* fix(sanity): issue where the createVersionSuccess was never resolving

* feat(sanity): add telemetry when adding version

* refactor(sanity): rename bundles to releases telemetry

* feat(sanity): add telemetry when creating release

* feat(sanity): add telemetry when updating release

* feat(sanity): add telemetry when deleting release

* feat(sanity): add telemetry when publishing release

* feat(sanity): add telemetry when archive and unarchive release

* chore(sanity): fix dependencies

* feat(sanity): add telemetry when creating a draft

* refactor(sanity): add telemetry for tracking drafts and include version

* refactor(sanity): update telemetry request for creating release

* refactor(sanity): reuse interface for OriginInfo

* docs(sanity): clarify unarchive / archive telemetry track
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants