Skip to content

Commit

Permalink
fixup! fix(exporter-metrics-otlp-http): browser OTLPMetricExporter wa…
Browse files Browse the repository at this point in the history
…s not passing config to OTLPMetricExporterBase super class (open-telemetry#5331)
  • Loading branch information
pichlermarc committed Jan 13, 2025
1 parent 87c1e6e commit 4d03fd7
Showing 1 changed file with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import { AggregationTemporalityPreference } from '../../src';
import {
AggregationOption,
Aggregation,
AggregationTemporality,
AggregationType,
ExplicitBucketHistogramAggregation,
InstrumentType,
MeterProvider,
PeriodicExportingMetricReader,
Expand Down Expand Up @@ -223,12 +223,9 @@ describe('OTLPMetricExporter', function () {

describe('aggregation', () => {
it('aggregationSelector calls the selector supplied to the constructor', () => {
const aggregation: AggregationOption = {
type: AggregationType.EXPLICIT_BUCKET_HISTOGRAM,
options: {
boundaries: [0, 100, 100000],
},
};
const aggregation: Aggregation = new ExplicitBucketHistogramAggregation([
0, 100, 100000,
]);
const exporter = new OTLPMetricExporter({
aggregationPreference: _instrumentType => aggregation,
});
Expand All @@ -240,15 +237,11 @@ describe('OTLPMetricExporter', function () {

it('aggregationSelector returns the default aggregation preference when nothing is supplied', () => {
const exporter = new OTLPMetricExporter({
aggregationPreference: _instrumentType => ({
type: AggregationType.DEFAULT,
}),
aggregationPreference: _instrumentType => Aggregation.Default(),
});
assert.deepStrictEqual(
exporter.selectAggregation(InstrumentType.COUNTER),
{
type: AggregationType.DEFAULT,
}
Aggregation.Default()
);
});
});
Expand Down

0 comments on commit 4d03fd7

Please sign in to comment.