Skip to content

Commit d9ce51f

Browse files
lforstAbhiPrasad
authored andcommitted
feat(tracing): Make setMeasurement public API (#4933)
1 parent c8fb2fc commit d9ce51f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

packages/tracing/src/transaction.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
6868
}
6969

7070
/**
71-
* Set observed measurement for this transaction.
72-
*
73-
* @param name Name of the measurement
74-
* @param value Value of the measurement
75-
* @param unit Unit of the measurement. (Defaults to an empty string)
76-
* @hidden
71+
* @inheritDoc
7772
*/
7873
public setMeasurement(name: string, value: number, unit: string = ''): void {
7974
this._measurements[name] = { value, unit };

packages/types/src/transaction.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ export interface Transaction extends TransactionContext, Span {
7373
*/
7474
setName(name: string): void;
7575

76+
/**
77+
* Set observed measurement for this transaction.
78+
*
79+
* @param name Name of the measurement
80+
* @param value Value of the measurement
81+
* @param unit Unit of the measurement. (Defaults to an empty string)
82+
*/
83+
setMeasurement(name: string, value: number, unit: string): void;
84+
7685
/** Returns the current transaction properties as a `TransactionContext` */
7786
toContext(): TransactionContext;
7887

0 commit comments

Comments
 (0)