Skip to content

Commit

Permalink
fix: remove attributes from OTLPExporterConfigBase (#2991)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
  • Loading branch information
Flarna and vmarchaud authored May 28, 2022
1 parent edf6157 commit e44f6d1
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 20 deletions.
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ All notable changes to experimental packages in this project will be documented
* removed the second parameter `callback`
* returns an `Observable` object on which callbacks can be registered or unregistered.
* added `meter.addBatchObservableCallback` and `meter.removeBatchObservableCallback`.
* fix: remove attributes from OTLPExporterConfigBase #2991 @flarna

### :rocket: (Enhancement)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ describe('OTLPTraceExporter - web', () => {
onInitSpy = sinon.stub(OTLPTraceExporter.prototype, 'onInit');
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
collectorTraceExporter = new OTLPTraceExporter(collectorExporterConfig);
Expand Down Expand Up @@ -86,7 +85,6 @@ describe('OTLPTraceExporter - web', () => {
beforeEach(() => {
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
httpAgentOptions: { keepAliveMsecs: 2000 },
Expand Down Expand Up @@ -394,7 +393,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
compression: CompressionAlgorithm.GZIP,
Expand Down Expand Up @@ -469,7 +467,6 @@ describe('OTLPTraceExporter - node with json over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
httpAgentOptions: { keepAliveMsecs: 2000 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ describe('OTLPTraceExporter - node with proto over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
httpAgentOptions: { keepAliveMsecs: 2000 },
Expand Down Expand Up @@ -273,7 +272,6 @@ describe('OTLPTraceExporter - node with proto over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
compression: CompressionAlgorithm.GZIP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ describe('OTLPMetricExporter - common', () => {
onInitSpy = sinon.stub(OTLPMetricExporter.prototype, 'onInit');
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
collectorExporter = new OTLPMetricExporter(collectorExporterConfig);
Expand Down Expand Up @@ -182,7 +181,6 @@ describe('OTLPMetricExporter - common', () => {
);
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
collectorExporter = new OTLPMetricExporter(collectorExporterConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ describe('OTLPMetricExporter - node with json over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
httpAgentOptions: { keepAliveMsecs: 2000 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ describe('OTLPMetricExporter - node with proto over http', () => {
foo: 'bar',
},
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
keepAlive: true,
httpAgentOptions: { keepAliveMsecs: 2000 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { SpanAttributes, diag } from '@opentelemetry/api';
import { diag } from '@opentelemetry/api';
import { ExportResult, ExportResultCode, BindOnceFuture } from '@opentelemetry/core';
import {
OTLPExporterError,
Expand All @@ -33,7 +33,6 @@ export abstract class OTLPExporterBase<
> {
public readonly url: string;
public readonly hostname: string | undefined;
public readonly attributes?: SpanAttributes;
public readonly timeoutMillis: number;
protected _concurrencyLimit: number;
protected _sendingPromises: Promise<unknown>[] = [];
Expand All @@ -48,8 +47,6 @@ export abstract class OTLPExporterBase<
this.hostname = config.hostname;
}

this.attributes = config.attributes;

this.shutdown = this.shutdown.bind(this);
this._shutdownOnce = new BindOnceFuture(this._shutdown, this);

Expand Down
3 changes: 0 additions & 3 deletions experimental/packages/otlp-exporter-base/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import { SpanAttributes } from '@opentelemetry/api';

/**
* Interface for handling error
*/
Expand Down Expand Up @@ -49,7 +47,6 @@ export interface ExportServiceError {
export interface OTLPExporterConfigBase {
headers?: Partial<Record<string, unknown>>;
hostname?: string;
attributes?: SpanAttributes;
url?: string;
concurrencyLimit?: number;
/** Maximum time the OTLP exporter will wait for each batch export.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ describe('OTLPTraceExporter - common', () => {
onInitSpy = sinon.stub(OTLPTraceExporter.prototype, 'onInit');
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
collectorExporter = new OTLPTraceExporter(collectorExporterConfig);
Expand Down Expand Up @@ -207,7 +206,6 @@ describe('OTLPTraceExporter - common', () => {
);
collectorExporterConfig = {
hostname: 'foo',
attributes: {},
url: 'http://foo.bar.com',
};
collectorExporter = new OTLPTraceExporter(collectorExporterConfig);
Expand Down

0 comments on commit e44f6d1

Please sign in to comment.