From c225d846c7fad15f6a8bcb8648538184ecceba21 Mon Sep 17 00:00:00 2001 From: Olivier Albertini Date: Wed, 24 Jul 2019 11:54:34 -0400 Subject: [PATCH] Update tracer interface (#125) Change return type "unknow" to HttpTextFormat for getHttpTextFormat Change return type "unknow" to BinaryFormat for getBinaryFormat Close #124 #123 Signed-off-by: Olivier Albertini --- packages/opentelemetry-types/src/trace/tracer.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/opentelemetry-types/src/trace/tracer.ts b/packages/opentelemetry-types/src/trace/tracer.ts index bec95f23604..6d580601ed8 100644 --- a/packages/opentelemetry-types/src/trace/tracer.ts +++ b/packages/opentelemetry-types/src/trace/tracer.ts @@ -14,8 +14,10 @@ * limitations under the License. */ +import { HttpTextFormat } from '../context/propagation/HttpTextFormat'; import { Span } from './span'; import { SpanOptions } from './SpanOptions'; +import { BinaryFormat } from '../context/propagation/BinaryFormat'; /** * Tracer provides an interface for creating {@link Span}s and propagating @@ -73,10 +75,8 @@ export interface Tracer { * Context binary format ({@link BinaryFormat}). For more details see * W3C Trace Context * binary protocol. - * - * @todo: Change return type once BinaryFormat is available */ - getBinaryFormat(): unknown; + getBinaryFormat(): BinaryFormat; /** * Returns the {@link HttpTextFormat} interface which can inject/extract @@ -85,8 +85,6 @@ export interface Tracer { * If no tracer implementation is provided, this defaults to the W3C Trace * Context HTTP text format ({@link HttpTraceContext}). For more details see * W3C Trace Context. - * - * @todo: Change return type once HttpTextFormat is available */ - getHttpTextFormat(): unknown; + getHttpTextFormat(): HttpTextFormat; }