Skip to content

Commit e44f6d1

Browse files
Flarnavmarchaud
andauthored
fix: remove attributes from OTLPExporterConfigBase (#2991)
Co-authored-by: Valentin Marchaud <[email protected]>
1 parent edf6157 commit e44f6d1

File tree

10 files changed

+2
-20
lines changed

10 files changed

+2
-20
lines changed

experimental/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All notable changes to experimental packages in this project will be documented
2525
* removed the second parameter `callback`
2626
* returns an `Observable` object on which callbacks can be registered or unregistered.
2727
* added `meter.addBatchObservableCallback` and `meter.removeBatchObservableCallback`.
28+
* fix: remove attributes from OTLPExporterConfigBase #2991 @flarna
2829

2930
### :rocket: (Enhancement)
3031

experimental/packages/exporter-trace-otlp-http/test/browser/CollectorTraceExporter.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ describe('OTLPTraceExporter - web', () => {
5757
onInitSpy = sinon.stub(OTLPTraceExporter.prototype, 'onInit');
5858
collectorExporterConfig = {
5959
hostname: 'foo',
60-
attributes: {},
6160
url: 'http://foo.bar.com',
6261
};
6362
collectorTraceExporter = new OTLPTraceExporter(collectorExporterConfig);
@@ -86,7 +85,6 @@ describe('OTLPTraceExporter - web', () => {
8685
beforeEach(() => {
8786
collectorExporterConfig = {
8887
hostname: 'foo',
89-
attributes: {},
9088
url: 'http://foo.bar.com',
9189
};
9290
});

experimental/packages/exporter-trace-otlp-http/test/node/CollectorTraceExporter.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
195195
foo: 'bar',
196196
},
197197
hostname: 'foo',
198-
attributes: {},
199198
url: 'http://foo.bar.com',
200199
keepAlive: true,
201200
httpAgentOptions: { keepAliveMsecs: 2000 },
@@ -394,7 +393,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
394393
foo: 'bar',
395394
},
396395
hostname: 'foo',
397-
attributes: {},
398396
url: 'http://foo.bar.com',
399397
keepAlive: true,
400398
compression: CompressionAlgorithm.GZIP,
@@ -469,7 +467,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
469467
foo: 'bar',
470468
},
471469
hostname: 'foo',
472-
attributes: {},
473470
url: 'http://foo.bar.com',
474471
keepAlive: true,
475472
httpAgentOptions: { keepAliveMsecs: 2000 },

experimental/packages/exporter-trace-otlp-proto/test/OTLPTraceExporter.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ describe('OTLPTraceExporter - node with proto over http', () => {
145145
foo: 'bar',
146146
},
147147
hostname: 'foo',
148-
attributes: {},
149148
url: 'http://foo.bar.com',
150149
keepAlive: true,
151150
httpAgentOptions: { keepAliveMsecs: 2000 },
@@ -273,7 +272,6 @@ describe('OTLPTraceExporter - node with proto over http', () => {
273272
foo: 'bar',
274273
},
275274
hostname: 'foo',
276-
attributes: {},
277275
url: 'http://foo.bar.com',
278276
keepAlive: true,
279277
compression: CompressionAlgorithm.GZIP,

experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/common/CollectorMetricExporter.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ describe('OTLPMetricExporter - common', () => {
6262
onInitSpy = sinon.stub(OTLPMetricExporter.prototype, 'onInit');
6363
collectorExporterConfig = {
6464
hostname: 'foo',
65-
attributes: {},
6665
url: 'http://foo.bar.com',
6766
};
6867
collectorExporter = new OTLPMetricExporter(collectorExporterConfig);
@@ -182,7 +181,6 @@ describe('OTLPMetricExporter - common', () => {
182181
);
183182
collectorExporterConfig = {
184183
hostname: 'foo',
185-
attributes: {},
186184
url: 'http://foo.bar.com',
187185
};
188186
collectorExporter = new OTLPMetricExporter(collectorExporterConfig);

experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/node/CollectorMetricExporter.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ describe('OTLPMetricExporter - node with json over http', () => {
197197
foo: 'bar',
198198
},
199199
hostname: 'foo',
200-
attributes: {},
201200
url: 'http://foo.bar.com',
202201
keepAlive: true,
203202
httpAgentOptions: { keepAliveMsecs: 2000 },

experimental/packages/opentelemetry-exporter-metrics-otlp-proto/test/OTLPMetricExporter.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ describe('OTLPMetricExporter - node with proto over http', () => {
150150
foo: 'bar',
151151
},
152152
hostname: 'foo',
153-
attributes: {},
154153
url: 'http://foo.bar.com',
155154
keepAlive: true,
156155
httpAgentOptions: { keepAliveMsecs: 2000 },

experimental/packages/otlp-exporter-base/src/OTLPExporterBase.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { SpanAttributes, diag } from '@opentelemetry/api';
17+
import { diag } from '@opentelemetry/api';
1818
import { ExportResult, ExportResultCode, BindOnceFuture } from '@opentelemetry/core';
1919
import {
2020
OTLPExporterError,
@@ -33,7 +33,6 @@ export abstract class OTLPExporterBase<
3333
> {
3434
public readonly url: string;
3535
public readonly hostname: string | undefined;
36-
public readonly attributes?: SpanAttributes;
3736
public readonly timeoutMillis: number;
3837
protected _concurrencyLimit: number;
3938
protected _sendingPromises: Promise<unknown>[] = [];
@@ -48,8 +47,6 @@ export abstract class OTLPExporterBase<
4847
this.hostname = config.hostname;
4948
}
5049

51-
this.attributes = config.attributes;
52-
5350
this.shutdown = this.shutdown.bind(this);
5451
this._shutdownOnce = new BindOnceFuture(this._shutdown, this);
5552

experimental/packages/otlp-exporter-base/src/types.ts

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

17-
import { SpanAttributes } from '@opentelemetry/api';
18-
1917
/**
2018
* Interface for handling error
2119
*/
@@ -49,7 +47,6 @@ export interface ExportServiceError {
4947
export interface OTLPExporterConfigBase {
5048
headers?: Partial<Record<string, unknown>>;
5149
hostname?: string;
52-
attributes?: SpanAttributes;
5350
url?: string;
5451
concurrencyLimit?: number;
5552
/** Maximum time the OTLP exporter will wait for each batch export.

experimental/packages/otlp-exporter-base/test/common/CollectorExporter.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ describe('OTLPTraceExporter - common', () => {
7373
onInitSpy = sinon.stub(OTLPTraceExporter.prototype, 'onInit');
7474
collectorExporterConfig = {
7575
hostname: 'foo',
76-
attributes: {},
7776
url: 'http://foo.bar.com',
7877
};
7978
collectorExporter = new OTLPTraceExporter(collectorExporterConfig);
@@ -207,7 +206,6 @@ describe('OTLPTraceExporter - common', () => {
207206
);
208207
collectorExporterConfig = {
209208
hostname: 'foo',
210-
attributes: {},
211209
url: 'http://foo.bar.com',
212210
};
213211
collectorExporter = new OTLPTraceExporter(collectorExporterConfig);

0 commit comments

Comments
 (0)