File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import { Span as SpanClass, SpanRecorder } from './span';
7
7
/** JSDoc */
8
8
export class Transaction extends SpanClass implements TransactionInterface {
9
9
public name : string ;
10
+
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ private _metadata : { [ key : string ] : any } = { } ;
13
+
10
14
private _measurements : Measurements = { } ;
11
15
12
16
/**
@@ -64,6 +68,15 @@ export class Transaction extends SpanClass implements TransactionInterface {
64
68
this . _measurements = { ...measurements } ;
65
69
}
66
70
71
+ /**
72
+ * Set metadata for this transaction.
73
+ * @hidden
74
+ */
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ public setMetadata ( newMetadata : { [ key : string ] : any } ) : void {
77
+ this . _metadata = { ...this . _metadata , ...newMetadata } ;
78
+ }
79
+
67
80
/**
68
81
* @inheritDoc
69
82
*/
@@ -108,6 +121,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
108
121
timestamp : this . endTimestamp ,
109
122
transaction : this . name ,
110
123
type : 'transaction' ,
124
+ debug_meta : this . _metadata ,
111
125
} ;
112
126
113
127
const hasMeasurements = Object . keys ( this . _measurements ) . length > 0 ;
You can’t perform that action at this time.
0 commit comments