File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { getCurrentHub, Hub } from '@sentry/hub';
22import {
33 Event ,
44 Measurements ,
5- MeasurementUnit ,
65 Transaction as TransactionInterface ,
76 TransactionContext ,
87 TransactionMetadata ,
@@ -72,10 +71,10 @@ export class Transaction extends SpanClass implements TransactionInterface {
7271 * Set observed measurement for this transaction.
7372 * @param name Name of the measurement
7473 * @param value Value of the measurement
75- * @param unit Unit of the measurement. (Defaults to 'ms' - milliseconds )
74+ * @param unit Unit of the measurement. (Defaults to an empty string )
7675 * @hidden
7776 */
78- public setMeasurement ( name : string , value : number , unit : MeasurementUnit = 'ms ' ) : void {
77+ public setMeasurement ( name : string , value : number , unit : string = '' ) : void {
7978 this . _measurements [ name ] = { value, unit } ;
8079 }
8180
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ export { Stacktrace } from './stacktrace';
5454export {
5555 CustomSamplingContext ,
5656 Measurements ,
57- MeasurementUnit ,
5857 SamplingContext ,
5958 TraceparentData ,
6059 Transaction ,
Original file line number Diff line number Diff line change @@ -115,8 +115,7 @@ export interface SamplingContext extends CustomSamplingContext {
115115 request ?: ExtractedNodeRequestData ;
116116}
117117
118- export type MeasurementUnit = 'ns' | 'ms' | 's' ;
119- export type Measurements = Record < string , { value : number ; unit : MeasurementUnit } > ;
118+ export type Measurements = Record < string , { value : number ; unit : string } > ;
120119
121120export type TransactionSamplingMethod = 'explicitly_set' | 'client_sampler' | 'client_rate' | 'inheritance' ;
122121
You can’t perform that action at this time.
0 commit comments