Log operation_id column to analytics

Reviewed By: sggutier

Differential Revision: D49395316

fbshipit-source-id: bd8d60216353450f3f044fa5e6fd9ff9c85b2da1
This commit is contained in:
Evan Krause 2023-09-20 10:43:19 -07:00 committed by Facebook GitHub Bot
parent c8333fa2c3
commit be5e3f01ca
2 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,7 @@ export class OperationQueue {
await tracker.operation(
operation.trackEventName,
'RunOperationError',
{extras: {args: operation.args, runner: operation.runner}},
{extras: {args: operation.args, runner: operation.runner}, operationId: operation.id},
_p => this.runCallback(operation, cwd, handleCommandProgress, controller.signal),
);
this.runningOperation = undefined;

View File

@ -41,6 +41,8 @@ export type TrackData = {
id?: string;
/** id field from another track event, for cross-referencing */
parentId?: string;
/** Unique ID for an sl command, also passed to sl itself for analytics correlation */
operationId?: string;
};
export type TrackDataWithEventName = TrackData & {eventName: TrackEventName};