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';
77/** JSDoc */
88export class Transaction extends SpanClass implements TransactionInterface {
99 public name : string ;
10+
11+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12+ private _metadata : { [ key : string ] : any } = { } ;
13+
1014 private _measurements : Measurements = { } ;
1115
1216 /**
@@ -64,6 +68,15 @@ export class Transaction extends SpanClass implements TransactionInterface {
6468 this . _measurements = { ...measurements } ;
6569 }
6670
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+
6780 /**
6881 * @inheritDoc
6982 */
@@ -108,6 +121,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
108121 timestamp : this . endTimestamp ,
109122 transaction : this . name ,
110123 type : 'transaction' ,
124+ debug_meta : this . _metadata ,
111125 } ;
112126
113127 const hasMeasurements = Object . keys ( this . _measurements ) . length > 0 ;
You can’t perform that action at this time.
0 commit comments