From 8f36da7212a3ec2af7d76f8d70271a1e1f43df82 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Mon, 10 Jun 2019 08:44:20 -0700 Subject: [PATCH] added note that Span is an interface (#89) * added note that Span is an interface * Update specification/tracing-api.md --- specification/tracing-api.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/tracing-api.md b/specification/tracing-api.md index 2fd0279df4d..871f0e574fc 100644 --- a/specification/tracing-api.md +++ b/specification/tracing-api.md @@ -32,6 +32,13 @@ mis-use of spans as an in-process information propagation mechanism. The only two getters on span returns `SpanContext` and the flag on whether span will be recorded. +`Span` interface can have alternative implementations. It is expected that +alternative implementations will be implementing vendor-specific logic. However, +implementation MUST NOT allow to directly create a `Span`. Alternative +implementation of `Span` can only be returned from alternative implementation of +`SpanBuilder`, which in turn is only available from the `Tracer`. See [Span +creation](#span-creation). + ### Span creation TODO: SpanBuilder API https://github.com/open-telemetry/opentelemetry-specification/issues/37