File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
69
69
70
70
/**
71
71
* Set observed measurement for this transaction.
72
+ *
72
73
* @param name Name of the measurement
73
74
* @param value Value of the measurement
74
75
* @param unit Unit of the measurement. (Defaults to an empty string)
@@ -78,6 +79,17 @@ export class Transaction extends SpanClass implements TransactionInterface {
78
79
this . _measurements [ name ] = { value, unit } ;
79
80
}
80
81
82
+ /**
83
+ * Set observed measurments for this transaction. This is a convenience function
84
+ * instead of multiple `setMeasurement` calls.
85
+ *
86
+ * @param measurements Measurements to set. Keys represent measurement names.
87
+ * Existing measurements with matching names will be overwritten.
88
+ */
89
+ public setMeasurements ( measurements : Measurements ) : void {
90
+ this . _measurements = { ...this . _measurements , ...measurements } ;
91
+ }
92
+
81
93
/**
82
94
* Set metadata for this transaction.
83
95
* @hidden
You can’t perform that action at this time.
0 commit comments