@@ -21,15 +21,13 @@ import { Resource } from '@opentelemetry/resources';
21
21
import * as assert from 'assert' ;
22
22
import * as sinon from 'sinon' ;
23
23
import {
24
- Aggregator ,
25
24
CounterMetric ,
26
25
Histogram ,
27
26
LastValue ,
28
27
LastValueAggregator ,
29
28
Meter ,
30
29
MeterProvider ,
31
30
Metric ,
32
- MetricDescriptor ,
33
31
MetricKind ,
34
32
MetricRecord ,
35
33
Sum ,
@@ -40,7 +38,6 @@ import {
40
38
import { BatchObserver } from '../src/BatchObserver' ;
41
39
import { BatchObserverResult } from '../src/BatchObserverResult' ;
42
40
import { SumAggregator } from '../src/export/aggregators' ;
43
- import { Processor } from '../src/export/Processor' ;
44
41
import { ObservableCounterMetric } from '../src/ObservableCounterMetric' ;
45
42
import { ObservableUpDownCounterMetric } from '../src/ObservableUpDownCounterMetric' ;
46
43
import { hashLabels } from '../src/Utils' ;
@@ -1364,28 +1361,8 @@ describe('Meter', () => {
1364
1361
assert . strictEqual ( value , 10 ) ;
1365
1362
} ) ;
1366
1363
} ) ;
1367
-
1368
- it ( 'should allow custom processor' , ( ) => {
1369
- const customMeter = new MeterProvider ( ) . getMeter ( 'custom-processor' , '*' , {
1370
- processor : new CustomProcessor ( ) ,
1371
- } ) ;
1372
- assert . throws ( ( ) => {
1373
- const histogram = customMeter . createHistogram ( 'myHistogram' ) as HistogramMetric ;
1374
- histogram . bind ( { } ) . record ( 1 ) ;
1375
- } , / a g g r e g a t o r F o r m e t h o d n o t i m p l e m e n t e d / ) ;
1376
- } ) ;
1377
1364
} ) ;
1378
1365
1379
- class CustomProcessor extends Processor {
1380
- process ( record : MetricRecord ) : void {
1381
- throw new Error ( 'process method not implemented.' ) ;
1382
- }
1383
-
1384
- aggregatorFor ( metricKind : MetricDescriptor ) : Aggregator {
1385
- throw new Error ( 'aggregatorFor method not implemented.' ) ;
1386
- }
1387
- }
1388
-
1389
1366
function ensureMetric ( metric : MetricRecord , name ?: string , value ?: LastValue ) {
1390
1367
assert . ok ( metric . aggregator instanceof LastValueAggregator ) ;
1391
1368
const lastValue = metric . aggregator . toPoint ( ) . value ;
0 commit comments