Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ All notable changes to experimental packages in this project will be documented

### :boom: Breaking Change

* chore(metrics-sdk): clean up exports [#3197](https://github.com/open-telemetry/opentelemetry-js/pull/3197) @pichlermarc
* removes export for:
* `AccumulationRecord`
* `Aggregator`
* `AggregatorKind`
* `Accumulation`
* `createInstrumentDescriptor`
* `createInstrumentDescriptorWithView`
* `isDescriptorCompatibleWith`

### :rocket: (Enhancement)

### :bug: (Bug Fix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Histogram } from '../aggregator/types';
/**
* Basic metric data fields.
*/
export interface BaseMetricData {
interface BaseMetricData {
readonly descriptor: InstrumentDescriptor;
readonly aggregationTemporality: AggregationTemporality;
/**
Expand Down
92 changes: 76 additions & 16 deletions experimental/packages/opentelemetry-sdk-metrics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,79 @@
* limitations under the License.
*/

export { Sum, LastValue, Histogram } from './aggregator/types';
export * from './export/AggregationTemporality';
export * from './export/MetricData';
export * from './export/MetricExporter';
export * from './export/MetricProducer';
export * from './export/MetricReader';
export * from './export/PeriodicExportingMetricReader';
export * from './export/InMemoryMetricExporter';
export * from './export/ConsoleMetricExporter';
export { InstrumentDescriptor, InstrumentType } from './InstrumentDescriptor';
export * from './Meter';
export * from './MeterProvider';
export * from './ObservableResult';
export { TimeoutError } from './utils';
Comment thread
pichlermarc marked this conversation as resolved.
export * from './view/Aggregation';
export * from './view/View';
export {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 We should be explicit about what is exported.

Sum,
LastValue,
Histogram,
} from './aggregator/types';

export {
AggregationTemporality,
AggregationTemporalitySelector,
} from './export/AggregationTemporality';

export {
DataPoint,
DataPointType,
SumMetricData,
GaugeMetricData,
HistogramMetricData,
ResourceMetrics,
ScopeMetrics,
MetricData,
CollectionResult,
} from './export/MetricData';

export {
PushMetricExporter,
} from './export/MetricExporter';

export {
MetricReader,
} from './export/MetricReader';

export {
PeriodicExportingMetricReader,
PeriodicExportingMetricReaderOptions,
} from './export/PeriodicExportingMetricReader';

export {
InMemoryMetricExporter,
} from './export/InMemoryMetricExporter';

export {
ConsoleMetricExporter,
} from './export/ConsoleMetricExporter';

export {
InstrumentDescriptor,
InstrumentType,
} from './InstrumentDescriptor';

export {
Meter,
} from './Meter';

export {
MeterProvider,
MeterProviderOptions,
} from './MeterProvider';

export {
DefaultAggregation,
ExplicitBucketHistogramAggregation,
DropAggregation,
HistogramAggregation,
LastValueAggregation,
SumAggregation,
Aggregation
} from './view/Aggregation';

export {
View,
ViewOptions,
} from './view/View';

export {
TimeoutError
} from './utils';
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@

import { ValueType } from '@opentelemetry/api-metrics';
import * as assert from 'assert';
import { BatchObservableResultImpl, InstrumentType } from '../src';
import { InstrumentType } from '../src';
import { ObservableInstrument } from '../src/Instruments';
import { ObservableResultImpl } from '../src/ObservableResult';
import {
BatchObservableResultImpl,
ObservableResultImpl
} from '../src/ObservableResult';
import { ObservableRegistry } from '../src/state/ObservableRegistry';
import { commonAttributes, commonValues, defaultInstrumentDescriptor } from './util';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import {
Meter,
MeterProvider,
DataPointType,
CollectionResult,
View
} from '../../src';
import { assertMetricData, defaultInstrumentationScope, defaultResource, sleep } from '../util';
import { TestMetricReader } from '../export/TestMetricReader';
import { MeterSharedState } from '../../src/state/MeterSharedState';
import { CollectionResult } from '../../src/export/MetricData';

describe('MeterSharedState', () => {
afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

import * as assert from 'assert';
import * as sinon from 'sinon';
import { MeterProvider, TimeoutError } from '../../src';
import { MeterProvider } from '../../src';
import { TimeoutError } from '../../src/utils';
import { DataPointType } from '../../src/export/MetricData';
import { PushMetricExporter } from '../../src/export/MetricExporter';
import { MeterProviderSharedState } from '../../src/state/MeterProviderSharedState';
Expand Down