From d3ce25c17d72479676723f82a95cdc38143be51a Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Fri, 18 Oct 2019 09:08:43 -0700 Subject: [PATCH] chore: TODO cleanup (#439) * chore: cleanup closed issues * chore: update basic tracer * chore: clear #59 * chore: clear todo in DEFAULT_CONFIG --- packages/opentelemetry-tracing/src/Span.ts | 6 ------ packages/opentelemetry-tracing/src/config.ts | 2 -- packages/opentelemetry-tracing/test/Span.test.ts | 1 - packages/opentelemetry-types/src/trace/span.ts | 10 ---------- packages/opentelemetry-types/src/trace/status.ts | 2 -- 5 files changed, 21 deletions(-) diff --git a/packages/opentelemetry-tracing/src/Span.ts b/packages/opentelemetry-tracing/src/Span.ts index 0713e01a3ad..618b8607753 100644 --- a/packages/opentelemetry-tracing/src/Span.ts +++ b/packages/opentelemetry-tracing/src/Span.ts @@ -25,7 +25,6 @@ import { TraceParams } from './types'; * This class represents a span. */ export class Span implements types.Span, ReadableSpan { - private readonly _tracer: types.Tracer; // Below properties are included to implement ReadableSpan for export // purposes but are not intended to be written-to directly. readonly spanContext: types.SpanContext; @@ -55,7 +54,6 @@ export class Span implements types.Span, ReadableSpan { parentSpanId?: string, startTime: types.TimeInput = hrTime() ) { - this._tracer = parentTracer; this.name = spanName; this.spanContext = spanContext; this.parentSpanId = parentSpanId; @@ -67,10 +65,6 @@ export class Span implements types.Span, ReadableSpan { this._spanProcessor.onStart(this); } - tracer(): types.Tracer { - return this._tracer; - } - context(): types.SpanContext { return this.spanContext; } diff --git a/packages/opentelemetry-tracing/src/config.ts b/packages/opentelemetry-tracing/src/config.ts index ff80c26c29f..9d7e983047c 100644 --- a/packages/opentelemetry-tracing/src/config.ts +++ b/packages/opentelemetry-tracing/src/config.ts @@ -47,6 +47,4 @@ export const DEFAULT_CONFIG = { numberOfLinksPerSpan: DEFAULT_MAX_LINKS_PER_SPAN, numberOfEventsPerSpan: DEFAULT_MAX_EVENTS_PER_SPAN, }, - // @todo add support for plugins - // plugins: {}, }; diff --git a/packages/opentelemetry-tracing/test/Span.test.ts b/packages/opentelemetry-tracing/test/Span.test.ts index f485e5a915c..79997a8e901 100644 --- a/packages/opentelemetry-tracing/test/Span.test.ts +++ b/packages/opentelemetry-tracing/test/Span.test.ts @@ -45,7 +45,6 @@ describe('Span', () => { it('should create a Span instance', () => { const span = new Span(tracer, name, spanContext, SpanKind.SERVER); assert.ok(span instanceof Span); - assert.strictEqual(span.tracer(), tracer); span.end(); }); diff --git a/packages/opentelemetry-types/src/trace/span.ts b/packages/opentelemetry-types/src/trace/span.ts index 27915949816..0db3ef4e0d1 100644 --- a/packages/opentelemetry-types/src/trace/span.ts +++ b/packages/opentelemetry-types/src/trace/span.ts @@ -34,13 +34,6 @@ export interface Span { */ context(): SpanContext; - // /** - // * # TODO - // * Returns the Tracer object used to create this Span. - // * https://github.com/open-telemetry/opentelemetry-specification/issues/21 - // */ - // tracer(): Tracer; - /** * Sets an attribute to the span. * @@ -85,8 +78,6 @@ export interface Span { /** * Updates the Span name. * - * TODO (revision): https://github.com/open-telemetry/opentelemetry-specification/issues/119 - * * @param name the Span name. */ updateName(name: string): this; @@ -102,7 +93,6 @@ export interface Span { * * @param [endTime] the time to set as Span's end time. If not provided, * use the current time as the span's end time. - * TODO (Add timestamp format): https://github.com/open-telemetry/opentelemetry-js/issues/19 */ end(endTime?: TimeInput): void; diff --git a/packages/opentelemetry-types/src/trace/status.ts b/packages/opentelemetry-types/src/trace/status.ts index 55eebbaef61..e9fa7201d8b 100644 --- a/packages/opentelemetry-types/src/trace/status.ts +++ b/packages/opentelemetry-types/src/trace/status.ts @@ -27,8 +27,6 @@ export interface Status { /** * An enumeration of canonical status codes. - * - * TODO (revision): https://github.com/open-telemetry/opentelemetry-specification/issues/59 */ export enum CanonicalCode { /**