Skip to content

Make TraceContext value init public #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the [W3C Trace Context standard (Level 1)](https://www.w3.org/TR/2020/REC-trace-
Add the following package dependency to your `Package.swift` file:

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

Then, add the `W3CTraceContext` library as a product dependency to each target you want to use it in:
Expand Down
7 changes: 6 additions & 1 deletion Sources/W3CTraceContext/TraceContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public struct TraceContext: Equatable {
/// The `TraceState` containing potentially vendor-specific trace information.
public let state: TraceState

init(parent: TraceParent, state: TraceState) {
/// Create a `TraceContext` from the given parent and state.
///
/// - Parameters:
/// - parent: The `TraceParent` stored in this context.
/// - state: The `TraceState` stored in this context.
public init(parent: TraceParent, state: TraceState) {
self.parent = parent
self.state = state
}
Expand Down