From 42f38096748c35a4e8958e0ff36211e2cea3316b Mon Sep 17 00:00:00 2001 From: Olivier Albertini Date: Tue, 23 Jul 2019 16:15:21 -0400 Subject: [PATCH] Update tracer interface 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 bec95f2360..6d580601ed 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; }