Skip to content

Commit b424540

Browse files
authored
Merge pull request #4 from slashmo/fix/trace-context-init
Make TraceContext value init public
2 parents 16a4c37 + eb042f0 commit b424540

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the [W3C Trace Context standard (Level 1)](https://www.w3.org/TR/2020/REC-trace-
1111
Add the following package dependency to your `Package.swift` file:
1212

1313
```swift
14-
.package(url: "https://github.com/slashmo/swift-w3c-trace-context", from: "0.2.0")
14+
.package(url: "https://github.com/slashmo/swift-w3c-trace-context", from: "0.3.0")
1515
```
1616

1717
Then, add the `W3CTraceContext` library as a product dependency to each target you want to use it in:

Sources/W3CTraceContext/TraceContext.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ public struct TraceContext: Equatable {
2020
/// The `TraceState` containing potentially vendor-specific trace information.
2121
public let state: TraceState
2222

23-
init(parent: TraceParent, state: TraceState) {
23+
/// Create a `TraceContext` from the given parent and state.
24+
///
25+
/// - Parameters:
26+
/// - parent: The `TraceParent` stored in this context.
27+
/// - state: The `TraceState` stored in this context.
28+
public init(parent: TraceParent, state: TraceState) {
2429
self.parent = parent
2530
self.state = state
2631
}

0 commit comments

Comments
 (0)