Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove attributes from OTLPExporterConfigBase #2991

Merged
merged 4 commits into from
May 28, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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