Skip to content

Commit

Permalink
fixup! fix(sdk-metrics) Don't Export from PeriodicExportingMetricRead…
Browse files Browse the repository at this point in the history
…er with No Metrics (open-telemetry#5288)
  • Loading branch information
pichlermarc committed Jan 13, 2025
1 parent 975f24c commit 94a227f
Showing 1 changed file with 11 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,22 @@
* limitations under the License.
*/

import { PeriodicExportingMetricReader } from '../../src/export/PeriodicExportingMetricReader';
import { AggregationTemporality } from '../../src/export/AggregationTemporality';
import {
Aggregation,
CollectionResult,
InstrumentType,
MetricProducer,
PushMetricExporter,
} from '../../src';
import {
DataPointType,
ResourceMetrics,
ScopeMetrics,
} from '../../src/export/MetricData';
import {PeriodicExportingMetricReader} from '../../src/export/PeriodicExportingMetricReader';
import {AggregationTemporality} from '../../src/export/AggregationTemporality';
import {Aggregation, CollectionResult, InstrumentType, MetricProducer, PushMetricExporter,} from '../../src';
import {DataPointType, ResourceMetrics, ScopeMetrics,} from '../../src/export/MetricData';
import * as assert from 'assert';
import * as sinon from 'sinon';
import { TimeoutError } from '../../src/utils';
import {
ExportResult,
ExportResultCode,
setGlobalErrorHandler,
} from '@opentelemetry/core';
import { assertRejects } from '../test-utils';
import { TestMetricProducer } from './TestMetricProducer';
import {
assertAggregationSelector,
assertAggregationTemporalitySelector,
} from './utils';
import {TimeoutError} from '../../src/utils';
import {ExportResult, ExportResultCode, setGlobalErrorHandler,} from '@opentelemetry/core';
import {assertRejects} from '../test-utils';
import {TestMetricProducer} from './TestMetricProducer';
import {assertAggregationSelector, assertAggregationTemporalitySelector,} from './utils';
import {
DEFAULT_AGGREGATION_SELECTOR,
DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,
} from '../../src/export/AggregationSelector';
import { ValueType } from '@opentelemetry/api';
import {ValueType} from '@opentelemetry/api';

const MAX_32_BIT_INT = 2 ** 31 - 1;

Expand Down Expand Up @@ -157,6 +140,7 @@ describe('PeriodicExportingMetricReader', () => {
descriptor: {
name: '',
description: '',
type: InstrumentType.GAUGE,
unit: '',
valueType: ValueType.INT,
},
Expand Down

0 comments on commit 94a227f

Please sign in to comment.