Skip to content

Commit 707a622

Browse files
committed
add method to set processing metadata on scope
1 parent 08345e9 commit 707a622

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/hub/src/scope.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,15 @@ export class Scope implements ScopeInterface {
450450
return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);
451451
}
452452

453+
/**
454+
* Add data which will be accessible during event processing but won't get sent to Sentry
455+
*/
456+
public setProcessingMetadata(newData: { [key: string]: any }): this {
457+
this._processingMetadata = { ...this._processingMetadata, ...newData };
458+
459+
return this;
460+
}
461+
453462
/**
454463
* This will be called after {@link applyToEvent} is finished.
455464
*/

0 commit comments

Comments
 (0)