@@ -12,7 +12,6 @@ import type {
12
12
Extras ,
13
13
Primitive ,
14
14
PropagationContext ,
15
- RequestSession ,
16
15
Session ,
17
16
SeverityLevel ,
18
17
Span ,
@@ -50,11 +49,17 @@ export interface ScopeContext {
50
49
contexts : Contexts ;
51
50
tags : { [ key : string ] : Primitive } ;
52
51
fingerprint : string [ ] ;
53
- // eslint-disable-next-line deprecation/deprecation
54
- requestSession : RequestSession ;
55
52
propagationContext : PropagationContext ;
56
53
}
57
54
55
+ // TODO(v9): Add `normalizedRequest`
56
+ export interface SdkProcessingMetadata {
57
+ [ key : string ] : unknown ;
58
+ requestSession ?: {
59
+ status : 'ok' | 'errored' | 'crashed' ;
60
+ } ;
61
+ }
62
+
58
63
/**
59
64
* Normalized data of the Scope, ready to be used.
60
65
*/
@@ -67,7 +72,7 @@ export interface ScopeData {
67
72
contexts : Contexts ;
68
73
attachments : Attachment [ ] ;
69
74
propagationContext : PropagationContext ;
70
- sdkProcessingMetadata : { [ key : string ] : unknown } ;
75
+ sdkProcessingMetadata : SdkProcessingMetadata ;
71
76
fingerprint : string [ ] ;
72
77
level ?: SeverityLevel ;
73
78
transactionName ?: string ;
@@ -112,7 +117,7 @@ export class Scope {
112
117
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
113
118
* sent to Sentry
114
119
*/
115
- protected _sdkProcessingMetadata : { [ key : string ] : unknown } ;
120
+ protected _sdkProcessingMetadata : SdkProcessingMetadata ;
116
121
117
122
/** Fingerprint */
118
123
protected _fingerprint ?: string [ ] ;
@@ -131,10 +136,6 @@ export class Scope {
131
136
/** Session */
132
137
protected _session ?: Session ;
133
138
134
- /** Request Mode Session Status */
135
- // eslint-disable-next-line deprecation/deprecation
136
- protected _requestSession ?: RequestSession ;
137
-
138
139
/** The client on this scope */
139
140
protected _client ?: Client ;
140
141
@@ -183,7 +184,6 @@ export class Scope {
183
184
newScope . _transactionName = this . _transactionName ;
184
185
newScope . _fingerprint = this . _fingerprint ;
185
186
newScope . _eventProcessors = [ ...this . _eventProcessors ] ;
186
- newScope . _requestSession = this . _requestSession ;
187
187
newScope . _attachments = [ ...this . _attachments ] ;
188
188
newScope . _sdkProcessingMetadata = { ...this . _sdkProcessingMetadata } ;
189
189
newScope . _propagationContext = { ...this . _propagationContext } ;
@@ -271,27 +271,6 @@ export class Scope {
271
271
return this . _user ;
272
272
}
273
273
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
-
295
274
/**
296
275
* Set an object that will be merged into existing tags on the scope,
297
276
* and will be sent as tags data with the event.
@@ -422,13 +401,12 @@ export class Scope {
422
401
423
402
const scopeToMerge = typeof captureContext === 'function' ? captureContext ( this ) : captureContext ;
424
403
425
- const [ scopeInstance , requestSession ] =
404
+ const scopeInstance =
426
405
scopeToMerge instanceof Scope
427
- ? // eslint-disable-next-line deprecation/deprecation
428
- [ scopeToMerge . getScopeData ( ) , scopeToMerge . getRequestSession ( ) ]
406
+ ? scopeToMerge . getScopeData ( )
429
407
: isPlainObject ( scopeToMerge )
430
- ? [ captureContext as ScopeContext , ( captureContext as ScopeContext ) . requestSession ]
431
- : [ ] ;
408
+ ? ( captureContext as ScopeContext )
409
+ : undefined ;
432
410
433
411
const { tags, extra, user, contexts, level, fingerprint = [ ] , propagationContext } = scopeInstance || { } ;
434
412
@@ -452,10 +430,6 @@ export class Scope {
452
430
this . _propagationContext = propagationContext ;
453
431
}
454
432
455
- if ( requestSession ) {
456
- this . _requestSession = requestSession ;
457
- }
458
-
459
433
return this ;
460
434
}
461
435
@@ -473,7 +447,6 @@ export class Scope {
473
447
this . _level = undefined ;
474
448
this . _transactionName = undefined ;
475
449
this . _fingerprint = undefined ;
476
- this . _requestSession = undefined ;
477
450
this . _session = undefined ;
478
451
_setSpanForScope ( this , undefined ) ;
479
452
this . _attachments = [ ] ;
0 commit comments