Skip to content

Commit c277d7b

Browse files
committed
minor span docs improvement
1 parent 61a1e3a commit c277d7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Sources/Tracing/Span.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
@_exported import Baggage
1515
import Dispatch
1616

17-
/// A `Span` type that follows the OpenTracing/OpenTelemetry spec. The span itself should not be
18-
/// initializable via its public interface. `Span` creation should instead go through `tracer.startSpan`
19-
/// where `tracer` conforms to `Tracer`.
17+
/// A `Span` represents an interval from the start of an operation to its end, along with additional metadata included
18+
/// with it. A `Span` can be created from a `Baggage` or `LoggingContext` which MAY contain existing span identifiers,
19+
/// in which case this span should be considered as "child" of the previous span.
2020
///
21-
/// - SeeAlso: [OpenTelemetry Specification: Span](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#span).
21+
/// Creating a `Span` is delegated to a `Tracer` and end users should never create them directly.
22+
///
23+
/// - SeeAlso: For more details refer to the [OpenTelemetry Specification: Span](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#span) which this type is compatible with.
2224
public protocol Span: AnyObject {
2325
/// The read-only `Baggage` of this `Span`, set when starting this `Span`.
2426
var baggage: Baggage { get }

0 commit comments

Comments
 (0)