Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 70370f9

Browse files
authored
Exporter/Stats/Stackdriver: Fix MetricDescriptors ValueType (#197)
* StackdriverStatsExporter: valueType to string * Remove MONEY, STRING and BOOL ValueTypes
1 parent dfa4612 commit 70370f9

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

packages/opencensus-exporter-stackdriver/src/types.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,10 @@ export enum MetricKind {
7272
}
7373

7474
export enum ValueType {
75-
VALUE_TYPE_UNSPECIFIED,
76-
BOOL,
77-
INT64,
78-
DOUBLE,
79-
STRING,
80-
DISTRIBUTION,
81-
MONEY
75+
VALUE_TYPE_UNSPECIFIED = 'VALUE_TYPE_UNSPECIFIED',
76+
INT64 = 'INT64',
77+
DOUBLE = 'DOUBLE',
78+
DISTRIBUTION = 'DISTRIBUTION'
8279
}
8380

8481
export interface LabelDescriptor {

packages/opencensus-exporter-stackdriver/test/test-stackdriver-monitoring.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
import {AggregationType, BaseView, logger, Logger, Measure, Measurement, MeasureType, MeasureUnit, Stats, View} from '@opencensus/core';
17+
import {AggregationType, BaseView, logger, Logger, Measurement, MeasureType, MeasureUnit, Stats, View} from '@opencensus/core';
1818
import * as assert from 'assert';
1919
import * as fs from 'fs';
20-
import * as mocha from 'mocha';
2120
import * as nock from 'nock';
22-
import * as path from 'path';
23-
2421
import {StackdriverStatsExporter} from '../src/stackdriver-monitoring';
25-
import {LabelDescriptor, MetricDescriptor, MetricKind, StackdriverExporterOptions, TimeSeries, ValueType} from '../src/types';
26-
22+
import {MetricDescriptor, MetricKind, StackdriverExporterOptions, TimeSeries, ValueType} from '../src/types';
2723
import * as nocks from './nocks';
2824

2925
let PROJECT_ID = 'fake-project-id';

0 commit comments

Comments
 (0)