From 6444d0118d17c6d9c9981a0467b0d1c1514fdaa3 Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Tue, 9 Apr 2019 20:02:05 -0700 Subject: [PATCH] Add comments for getMetric() method --- packages/opencensus-core/src/metrics/cumulative/cumulative.ts | 3 ++- packages/opencensus-core/src/metrics/types.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/opencensus-core/src/metrics/cumulative/cumulative.ts b/packages/opencensus-core/src/metrics/cumulative/cumulative.ts index 8691b061d..b11c74332 100644 --- a/packages/opencensus-core/src/metrics/cumulative/cumulative.ts +++ b/packages/opencensus-core/src/metrics/cumulative/cumulative.ts @@ -131,7 +131,8 @@ export class Cumulative implements Meter { /** * Provides a Metric with one or more TimeSeries. * - * @returns {Metric} The Metric. + * @returns {Metric} The Metric, or null if TimeSeries is not present in + * Metric. */ getMetric(): Metric|null { if (this.registeredPoints.size === 0) { diff --git a/packages/opencensus-core/src/metrics/types.ts b/packages/opencensus-core/src/metrics/types.ts index ffd69254d..f75664a14 100644 --- a/packages/opencensus-core/src/metrics/types.ts +++ b/packages/opencensus-core/src/metrics/types.ts @@ -17,11 +17,13 @@ import {MeasureUnit} from './../stats/types'; import {LabelKey, LabelValue, Metric} from './export/types'; +/** Provides a {@link Metric} with one or more {@link TimeSeries} */ export interface Meter { /** * Provides a Metric with one or more TimeSeries. * - * @returns {Metric} The Metric. + * @returns {Metric} The Metric, or null if TimeSeries is not present in + * Metric. */ getMetric(): Metric|null; }