Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 6906d6b

Browse files
committed
Update package for tracing package 1.0-beta1
1 parent 7ffcf03 commit 6906d6b

File tree

6 files changed

+15
-87
lines changed

6 files changed

+15
-87
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import PackageDescription
44
let package = Package(
55
name: "swift-distributed-tracing-extras",
66
platforms: [
7-
.macOS(.v10_13),
8-
.iOS(.v14),
9-
.tvOS(.v14),
10-
.watchOS(.v7),
7+
.macOS(.v10_15),
8+
.iOS(.v13),
9+
.tvOS(.v13),
10+
.watchOS(.v6),
1111
],
1212
products: [
1313
.library(
@@ -18,7 +18,7 @@ let package = Package(
1818
),
1919
],
2020
dependencies: [
21-
.package(url: "https://github.com/apple/swift-distributed-tracing.git", from: "0.3.0"),
21+
.package(url: "https://github.com/apple/swift-distributed-tracing.git", from: "1.0.0-beta.1"),
2222
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
2323
],
2424
targets: [

[email protected]

Lines changed: 0 additions & 38 deletions
This file was deleted.

[email protected]

Lines changed: 0 additions & 38 deletions
This file was deleted.

Sources/TracingOpenTelemetrySemanticConventions/SpanAttributes+CodeSemantics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ public struct CodeAttributes: SpanAttributeNamespace {
6464
/// E.g. 42.
6565
///
6666
/// You may want to set this attribute to `#line`.
67-
public var lineNumber: Key<Int> { "code.lineno" }
67+
public var lineNumber: Key<Int64> { "code.lineno" }
6868
}
6969
}

Sources/TracingOpenTelemetrySemanticConventions/SpanAttributes+RPCSemantics.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,16 @@ public struct RPCAttributes: SpanAttributeNamespace {
151151
}
152152

153153
public struct StatusCode: RawRepresentable, SpanAttributeConvertible {
154-
public let rawValue: Int
154+
public let rawValue: Int64
155155

156-
public init(rawValue: Int) {
156+
public init(rawValue: Int64) {
157157
self.rawValue = rawValue
158158
}
159159

160+
public init(_ rawValue: Int) {
161+
self.rawValue = Int64(exactly: rawValue)!
162+
}
163+
160164
/// OK
161165
public static let ok = StatusCode(rawValue: 0)
162166

@@ -209,7 +213,7 @@ public struct RPCAttributes: SpanAttributeNamespace {
209213
public static let unauthenticated = StatusCode(rawValue: 16)
210214

211215
public func toSpanAttribute() -> SpanAttribute {
212-
.int(self.rawValue)
216+
SpanAttribute.int64(self.rawValue)
213217
}
214218
}
215219
}

Tests/TracingOpenTelemetrySemanticConventionsTests/CodeSemanticsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class CodeSemanticsTests: XCTestCase {
2020
func test_code() {
2121
var attributes = SpanAttributes()
2222

23-
let line = #line
23+
let line: Int64 = #line
2424

2525
attributes.code.function = #function
2626
attributes.code.namespace = "Tracing"
@@ -31,7 +31,7 @@ final class CodeSemanticsTests: XCTestCase {
3131
"code.function": #function,
3232
"code.namespace": "Tracing",
3333
"code.filepath": #filePath,
34-
"code.lineno": .int(line),
34+
"code.lineno": .int64(Int64(line)),
3535
])
3636
}
3737
}

0 commit comments

Comments
 (0)