From b3bff17ac68b2aad29fcf5fa438c5f143c61d74a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 13 Apr 2022 13:55:41 +0000 Subject: [PATCH] ref(measurements): Make `setMeasurement` public API --- packages/tracing/src/transaction.ts | 7 +------ packages/types/src/transaction.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/tracing/src/transaction.ts b/packages/tracing/src/transaction.ts index 5384f15a6105..91fa4d3c435b 100644 --- a/packages/tracing/src/transaction.ts +++ b/packages/tracing/src/transaction.ts @@ -68,12 +68,7 @@ export class Transaction extends SpanClass implements TransactionInterface { } /** - * Set observed measurement for this transaction. - * - * @param name Name of the measurement - * @param value Value of the measurement - * @param unit Unit of the measurement. (Defaults to an empty string) - * @hidden + * @inheritDoc */ public setMeasurement(name: string, value: number, unit: string = ''): void { this._measurements[name] = { value, unit }; diff --git a/packages/types/src/transaction.ts b/packages/types/src/transaction.ts index 0367eafbb941..95f8b447e19a 100644 --- a/packages/types/src/transaction.ts +++ b/packages/types/src/transaction.ts @@ -73,6 +73,15 @@ export interface Transaction extends TransactionContext, Span { */ setName(name: string): void; + /** + * Set observed measurement for this transaction. + * + * @param name Name of the measurement + * @param value Value of the measurement + * @param unit Unit of the measurement. (Defaults to an empty string) + */ + setMeasurement(name: string, value: number, unit: string): void; + /** Returns the current transaction properties as a `TransactionContext` */ toContext(): TransactionContext;