diff --git a/packages/sdk-metrics/src/InstrumentDescriptor.ts b/packages/sdk-metrics/src/InstrumentDescriptor.ts index 4654ed7692..ed036eb4db 100644 --- a/packages/sdk-metrics/src/InstrumentDescriptor.ts +++ b/packages/sdk-metrics/src/InstrumentDescriptor.ts @@ -14,7 +14,12 @@ * limitations under the License. */ -import { MetricAdvice, MetricOptions, ValueType, diag } from '@opentelemetry/api'; +import { + MetricAdvice, + MetricOptions, + ValueType, + diag, +} from '@opentelemetry/api'; import { View } from './view/View'; import { equalsCaseInsensitive } from './utils'; diff --git a/packages/sdk-metrics/src/ObservableResult.ts b/packages/sdk-metrics/src/ObservableResult.ts index ccda216941..c9a7b202ea 100644 --- a/packages/sdk-metrics/src/ObservableResult.ts +++ b/packages/sdk-metrics/src/ObservableResult.ts @@ -34,7 +34,10 @@ export class ObservableResultImpl implements ObservableResult { */ _buffer = new AttributeHashMap(); - constructor(private _instrumentName: string, private _valueType: ValueType) {} + constructor( + private _instrumentName: string, + private _valueType: ValueType + ) {} /** * Observe a measurement of the value associated with the given attributes. @@ -46,10 +49,7 @@ export class ObservableResultImpl implements ObservableResult { ); return; } - if ( - this._valueType === ValueType.INT && - !Number.isInteger(value) - ) { + if (this._valueType === ValueType.INT && !Number.isInteger(value)) { diag.warn( `INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.` );