Send analytics in background#7615
Conversation
|
/snapit |
|
🫰✨ Thanks @gonzaloriestra! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260522143741Caution After installing, validate the version by running |
972e250 to
f72a8d8
Compare
f72a8d8 to
ddc22d9
Compare
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
375d96d to
a23f004
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
a23f004 to
0427849
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/analytics.d.ts@@ -6,6 +6,7 @@ interface ReportAnalyticsEventOptions {
errorMessage?: string;
exitMode: CommandExitMode;
}
+export declare function sendAnalyticsEventFromFile(payloadFile: string): Promise<void>;
/**
* Report an analytics event, sending it off to Monorail -- Shopify's internal analytics service.
*
|

WHY are these changes introduced?
HackDays project: https://vault.shopify.io/hackdays/154/projects/24279-Shopify-CLI-UX-improvements
Analytics delivery currently blocks command completion, adding noticeable latency to every CLI invocation.
WHAT is this pull request doing?
Writes the completed analytics payload to a temporary file and sends it from a detached internal command, allowing the original command to exit immediately.
Benchmark for
shopify version:4.5.0snapshotdemo.mp4
How to test your changes?
pnpm i -g @shopify/cli@0.0.0-snapshot-20260724084707shopify version --verboseChecklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add