File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ import { isInstanceOf, logger } from '@sentry/utils';
4
4
5
5
import { Span as SpanClass , SpanRecorder } from './span' ;
6
6
7
+ interface TransactionMetadata {
8
+ transactionSampling ?: { [ key : string ] : string | number } ;
9
+ }
10
+
7
11
/** JSDoc */
8
12
export class Transaction extends SpanClass implements TransactionInterface {
9
13
public name : string ;
10
14
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- private _metadata : { [ key : string ] : any } = { } ;
15
+ private _metadata : TransactionMetadata = { } ;
13
16
14
17
private _measurements : Measurements = { } ;
15
18
@@ -72,8 +75,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
72
75
* Set metadata for this transaction.
73
76
* @hidden
74
77
*/
75
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
- public setMetadata ( newMetadata : { [ key : string ] : any } ) : void {
78
+ public setMetadata ( newMetadata : TransactionMetadata ) : void {
77
79
this . _metadata = { ...this . _metadata , ...newMetadata } ;
78
80
}
79
81
You can’t perform that action at this time.
0 commit comments