Skip to content

Commit d9bdcc8

Browse files
authored
Merge pull request #94 from slashmo/feature/write-only-span-links
Remove links getter from Span protocol
2 parents 20ec488 + 540621c commit d9bdcc8

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
@@ -49,9 +49,6 @@ public protocol Span {
4949
/// Returns true if this `Span` is recording information like events, attributes, status, etc.
5050
var isRecording: Bool { get }
5151

52-
/// The read-only collection of linked `Span`s.
53-
var links: [SpanLink] { get }
54-
5552
/// Add a `SpanLink` in place.
5653
/// - Parameter link: The `SpanLink` to add to this `Span`.
5754
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 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)