@@ -12,7 +12,6 @@ import type {
1212 Extras ,
1313 Primitive ,
1414 PropagationContext ,
15- RequestSession ,
1615 Session ,
1716 SeverityLevel ,
1817 Span ,
@@ -50,11 +49,17 @@ export interface ScopeContext {
5049 contexts : Contexts ;
5150 tags : { [ key : string ] : Primitive } ;
5251 fingerprint : string [ ] ;
53- // eslint-disable-next-line deprecation/deprecation
54- requestSession : RequestSession ;
5552 propagationContext : PropagationContext ;
5653}
5754
55+ // TODO(v9): Add `normalizedRequest`
56+ export interface SdkProcessingMetadata {
57+ [ key : string ] : unknown ;
58+ requestSession ?: {
59+ status : 'ok' | 'errored' | 'crashed' ;
60+ } ;
61+ }
62+
5863/**
5964 * Normalized data of the Scope, ready to be used.
6065 */
@@ -67,7 +72,7 @@ export interface ScopeData {
6772 contexts : Contexts ;
6873 attachments : Attachment [ ] ;
6974 propagationContext : PropagationContext ;
70- sdkProcessingMetadata : { [ key : string ] : unknown } ;
75+ sdkProcessingMetadata : SdkProcessingMetadata ;
7176 fingerprint : string [ ] ;
7277 level ?: SeverityLevel ;
7378 transactionName ?: string ;
@@ -112,7 +117,7 @@ export class Scope {
112117 * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
113118 * sent to Sentry
114119 */
115- protected _sdkProcessingMetadata : { [ key : string ] : unknown } ;
120+ protected _sdkProcessingMetadata : SdkProcessingMetadata ;
116121
117122 /** Fingerprint */
118123 protected _fingerprint ?: string [ ] ;
@@ -131,10 +136,6 @@ export class Scope {
131136 /** Session */
132137 protected _session ?: Session ;
133138
134- /** Request Mode Session Status */
135- // eslint-disable-next-line deprecation/deprecation
136- protected _requestSession ?: RequestSession ;
137-
138139 /** The client on this scope */
139140 protected _client ?: Client ;
140141
@@ -183,7 +184,6 @@ export class Scope {
183184 newScope . _transactionName = this . _transactionName ;
184185 newScope . _fingerprint = this . _fingerprint ;
185186 newScope . _eventProcessors = [ ...this . _eventProcessors ] ;
186- newScope . _requestSession = this . _requestSession ;
187187 newScope . _attachments = [ ...this . _attachments ] ;
188188 newScope . _sdkProcessingMetadata = { ...this . _sdkProcessingMetadata } ;
189189 newScope . _propagationContext = { ...this . _propagationContext } ;
@@ -271,27 +271,6 @@ export class Scope {
271271 return this . _user ;
272272 }
273273
274- /**
275- * Get the request session from this scope.
276- *
277- * @deprecated Use `getSession()` and `setSession()` instead of `getRequestSession()` and `setRequestSession()`;
278- */
279- // eslint-disable-next-line deprecation/deprecation
280- public getRequestSession ( ) : RequestSession | undefined {
281- return this . _requestSession ;
282- }
283-
284- /**
285- * Set the request session for this scope.
286- *
287- * @deprecated Use `getSession()` and `setSession()` instead of `getRequestSession()` and `setRequestSession()`;
288- */
289- // eslint-disable-next-line deprecation/deprecation
290- public setRequestSession ( requestSession ?: RequestSession ) : this {
291- this . _requestSession = requestSession ;
292- return this ;
293- }
294-
295274 /**
296275 * Set an object that will be merged into existing tags on the scope,
297276 * and will be sent as tags data with the event.
@@ -422,13 +401,12 @@ export class Scope {
422401
423402 const scopeToMerge = typeof captureContext === 'function' ? captureContext ( this ) : captureContext ;
424403
425- const [ scopeInstance , requestSession ] =
404+ const scopeInstance =
426405 scopeToMerge instanceof Scope
427- ? // eslint-disable-next-line deprecation/deprecation
428- [ scopeToMerge . getScopeData ( ) , scopeToMerge . getRequestSession ( ) ]
406+ ? scopeToMerge . getScopeData ( )
429407 : isPlainObject ( scopeToMerge )
430- ? [ captureContext as ScopeContext , ( captureContext as ScopeContext ) . requestSession ]
431- : [ ] ;
408+ ? ( captureContext as ScopeContext )
409+ : undefined ;
432410
433411 const { tags, extra, user, contexts, level, fingerprint = [ ] , propagationContext } = scopeInstance || { } ;
434412
@@ -452,10 +430,6 @@ export class Scope {
452430 this . _propagationContext = propagationContext ;
453431 }
454432
455- if ( requestSession ) {
456- this . _requestSession = requestSession ;
457- }
458-
459433 return this ;
460434 }
461435
@@ -473,7 +447,6 @@ export class Scope {
473447 this . _level = undefined ;
474448 this . _transactionName = undefined ;
475449 this . _fingerprint = undefined ;
476- this . _requestSession = undefined ;
477450 this . _session = undefined ;
478451 _setSpanForScope ( this , undefined ) ;
479452 this . _attachments = [ ] ;
0 commit comments