Skip to content

Commit 95df052

Browse files
committed
Add setter
1 parent 79c0227 commit 95df052

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/core/src/scope.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,14 @@ export class Scope implements ScopeInterface {
532532
return this;
533533
}
534534

535+
/**
536+
* @inheritdoc
537+
*/
538+
public setPropagationContext(context: PropagationContext): this {
539+
this._propagationContext = context;
540+
return this;
541+
}
542+
535543
/**
536544
* This will be called after {@link applyToEvent} is finished.
537545
*/

packages/types/src/scope.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,9 @@ export interface Scope {
187187
* Add data which will be accessible during event processing but won't get sent to Sentry
188188
*/
189189
setSDKProcessingMetadata(newData: { [key: string]: unknown }): this;
190+
191+
/**
192+
* Add propagation context to the scope, used for distributed tracing
193+
*/
194+
setPropagationContext(context: PropagationContext): this;
190195
}

0 commit comments

Comments
 (0)