Skip to content

Commit

Permalink
chore: remove all references to SpanData (open-telemetry#286)
Browse files Browse the repository at this point in the history
* chore: remove all references to SpanData

* yarn fix
  • Loading branch information
bg451 authored and mayurkale22 committed Sep 20, 2019
1 parent fd1400a commit d18c844
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 49 deletions.
8 changes: 0 additions & 8 deletions packages/opentelemetry-basic-tracer/src/BasicTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@ export class BasicTracer implements types.Tracer {
return this._scopeManager.bind(target, span);
}

/**
* Records a SpanData.
*/
/* c8 ignore next 3 */
recordSpanData(span: types.Span): void {
// TODO: notify exporter
}

/**
* Returns the binary format interface which can serialize/deserialize Spans.
*/
Expand Down
5 changes: 0 additions & 5 deletions packages/opentelemetry-basic-tracer/test/BasicTracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,6 @@ describe('BasicTracer', () => {
});
});

describe('.recordSpanData()', () => {
// @todo: implement
it('should call exporters with span data');
});

describe('.getBinaryFormat()', () => {
it('should get default binary formatter', () => {
const tracer = new BasicTracer();
Expand Down
3 changes: 0 additions & 3 deletions packages/opentelemetry-core/src/trace/NoopTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ export class NoopTracer implements Tracer {
return target;
}

// By default does nothing
recordSpanData(span: Span): void {}

// By default does nothing
getBinaryFormat(): BinaryFormat {
return NOOP_BINARY_FORMAT;
Expand Down
8 changes: 0 additions & 8 deletions packages/opentelemetry-core/src/trace/TracerDelegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ export class TracerDelegate implements types.Tracer {
);
}

recordSpanData(span: types.Span): void {
return this._currentTracer.recordSpanData.apply(
this._currentTracer,
// tslint:disable-next-line:no-any
arguments as any
);
}

getBinaryFormat(): types.BinaryFormat {
return this._currentTracer.getBinaryFormat.apply(
this._currentTracer,
Expand Down
2 changes: 0 additions & 2 deletions packages/opentelemetry-core/test/trace/NoopTracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ describe('NoopTracer', () => {
NOOP_SPAN
);

tracer.recordSpanData(NOOP_SPAN);

assert.deepStrictEqual(tracer.getCurrentSpan(), NOOP_SPAN);
const httpTextFormat = tracer.getHttpTextFormat();
assert.ok(httpTextFormat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ describe('TracerDelegate', () => {
'startSpan',
'withSpan',
'bind',
'recordSpanData',
'getBinaryFormat',
'getHttpTextFormat',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe('globaltracer-utils', () => {
'getCurrentSpan',
'startSpan',
'withSpan',
'recordSpanData',
'getBinaryFormat',
'getHttpTextFormat',
];
Expand Down
5 changes: 0 additions & 5 deletions packages/opentelemetry-node-sdk/test/NodeTracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ describe('NodeTracer', () => {
});
});

describe('.recordSpanData()', () => {
// @todo: implement
it('should call exporters with span data');
});

describe('.getBinaryFormat()', () => {
it('should get default binary formatter', () => {
tracer = new NodeTracer({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ describe('HttpPlugin', () => {
beforeEach(() => {
tracer.startSpan = sinon.spy();
tracer.withSpan = sinon.spy();
tracer.recordSpanData = sinon.spy();
});

afterEach(() => {
Expand All @@ -78,10 +77,6 @@ describe('HttpPlugin', () => {
false
);
assert.strictEqual((tracer.withSpan as sinon.SinonSpy).called, false);
assert.strictEqual(
(tracer.recordSpanData as sinon.SinonSpy).called,
false
);
});
});
});
Expand Down
11 changes: 0 additions & 11 deletions packages/opentelemetry-types/src/trace/tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,6 @@ export interface Tracer {
*/
bind<T>(target: T, span?: Span): T;

/**
* Send a pre-populated span object to the exporter.
* Sampling and recording decisions as well as other collection optimizations
* are the responsibility of a caller.
*
* @todo: Pending API discussion. Revisit if Span or SpanData should be passed
* in here once this is sorted out.
* @param span Span Data to be reported to all exporters.
*/
recordSpanData(span: Span): void;

/**
* Returns the {@link BinaryFormat} interface which can serialize/deserialize
* Spans.
Expand Down

0 comments on commit d18c844

Please sign in to comment.