File tree Expand file tree Collapse file tree
apps/sim/lib/logs/execution Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -770,6 +770,9 @@ export class ExecutionLogger implements IExecutionLoggerService {
770770 ...( builtExecutionData . environment !== undefined
771771 ? { environment : builtExecutionData . environment }
772772 : { } ) ,
773+ ...( builtExecutionData . correlation !== undefined
774+ ? { correlation : builtExecutionData . correlation }
775+ : { } ) ,
773776 } )
774777
775778 const rawDurationMs =
@@ -797,6 +800,9 @@ export class ExecutionLogger implements IExecutionLoggerService {
797800 ...( pii . environment !== undefined
798801 ? { environment : pii . environment as ExecutionEnvironment }
799802 : { } ) ,
803+ ...( pii . correlation !== undefined
804+ ? { correlation : pii . correlation as ExecutionData [ 'correlation' ] }
805+ : { } ) ,
800806 }
801807
802808 stripSpanCosts ( ( cleanExecutionData as Record < string , unknown > ) . traceSpans )
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ describe('redactPIIFromExecution', () => {
9393 trigger : { type : 'webhook' , data : { from : 'caller@x.com' } } ,
9494 executionState : { status : 'completed' , note : 'state for e@f.com' } ,
9595 environment : { variables : { CONTACT : 'admin@x.com' } } ,
96+ correlation : { source : 'corr@x.com' } ,
9697 }
9798
9899 const result = await redactPIIFromExecution ( payload , { entityTypes : [ 'EMAIL_ADDRESS' ] } )
@@ -107,6 +108,7 @@ describe('redactPIIFromExecution', () => {
107108 expect ( ( result . trigger as any ) . data . from ) . toBe ( 'MASKED(caller@x.com)' )
108109 expect ( ( result . executionState as any ) . note ) . toBe ( 'MASKED(state for e@f.com)' )
109110 expect ( ( result . environment as any ) . variables . CONTACT ) . toBe ( 'MASKED(admin@x.com)' )
111+ expect ( ( result . correlation as any ) . source ) . toBe ( 'MASKED(corr@x.com)' )
110112 } )
111113
112114 it ( 'returns payload unchanged when there is nothing to mask' , async ( ) => {
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export interface RedactablePayload {
2929 trigger ?: unknown
3030 executionState ?: unknown
3131 environment ?: unknown
32+ correlation ?: unknown
3233}
3334
3435/** Keys of {@link RedactablePayload} processed by the redactor, in order. */
@@ -41,6 +42,7 @@ const REDACTABLE_KEYS: (keyof RedactablePayload)[] = [
4142 'trigger' ,
4243 'executionState' ,
4344 'environment' ,
45+ 'correlation' ,
4446]
4547
4648/** Trace-span fields that carry runtime content (and therefore possible PII). */
You can’t perform that action at this time.
0 commit comments