Skip to content

Commit 540621c

Browse files
committed
Remove links getter from Span protocol
1 parent 208e169 commit 540621c

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

Sources/Instrumentation/Tracing/NoOpTracing.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public struct NoOpTracingInstrument: TracingInstrument {
3939
public var operationName: String = ""
4040
public var status: SpanStatus?
4141
public let kind: SpanKind = .internal
42-
public let links = [SpanLink]()
4342

4443
public var startTimestamp: DispatchTime {
4544
.now()

Sources/Instrumentation/Tracing/Span.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ public protocol Span {
5454
/// Returns true if this `Span` is recording information like events, attributes, status, etc.
5555
var isRecording: Bool { get }
5656

57-
/// The read-only collection of linked `Span`s.
58-
var links: [SpanLink] { get }
59-
6057
/// Add a `SpanLink` in place.
6158
/// - Parameter link: The `SpanLink` to add to this `Span`.
6259
mutating func addLink(_ link: SpanLink)

Tests/InstrumentationTests/Tracing/TracedLockTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private final class TracedLockPrintlnTracer: TracingInstrument {
9292

9393
let baggage: BaggageContext
9494

95-
private(set) var links = [SpanLink]()
95+
private var links = [SpanLink]()
9696

9797
private(set) var events = [SpanEvent]() {
9898
didSet {

Tests/InstrumentationTests/TracingInstrumentTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct OTSpan: Span {
112112
}
113113
}
114114

115-
private(set) var links = [SpanLink]()
115+
private var links = [SpanLink]()
116116

117117
var attributes: SpanAttributes = [:] {
118118
didSet {

0 commit comments

Comments
 (0)