Skip to content

Commit 21f3e2f

Browse files
committed
Add documentation hints to SpanAttributeName constants 📖
1 parent 94c9c3f commit 21f3e2f

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

Sources/OpenTelemetryInstrumentationSupport/SpanAttribute+EndUser.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
import TracingInstrumentation
1515

1616
extension SpanAttributeName {
17+
/// - See: EndUserAttributes
1718
public static let endUserID = "enduser.id"
19+
/// - See: EndUserAttributes
1820
public static let endUserRole = "enduser.role"
21+
/// - See: EndUserAttributes
1922
public static let endUserScope = "enduser.scope"
2023
}
2124

Sources/OpenTelemetryInstrumentationSupport/SpanAttribute+HTTPSemantics.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,37 @@
1414
import TracingInstrumentation
1515

1616
extension SpanAttributeName {
17+
/// - See: HTTPAttributes
1718
public static let httpMethod = "http.method"
19+
/// - See: HTTPAttributes
1820
public static let httpURL = "http.url"
21+
/// - See: HTTPAttributes
1922
public static let httpTarget = "http.target"
23+
/// - See: HTTPAttributes
2024
public static let httpHost = "http.host"
25+
/// - See: HTTPAttributes
2126
public static let httpScheme = "http.scheme"
27+
/// - See: HTTPAttributes
2228
public static let httpStatusCode = "http.status_code"
29+
/// - See: HTTPAttributes
2330
public static let httpStatusText = "http.status_text"
31+
/// - See: HTTPAttributes
2432
public static let httpFlavor = "http.flavor"
33+
/// - See: HTTPAttributes
2534
public static let httpUserAgent = "http.user_agent"
35+
/// - See: HTTPAttributes
2636
public static let httpRequestContentLength = "http.request_content_length"
37+
/// - See: HTTPAttributes
2738
public static let httpRequestContentLengthUncompressed = "http.request_content_length_uncompressed"
39+
/// - See: HTTPAttributes
2840
public static let httpResponseContentLength = "http.response_content_length"
41+
/// - See: HTTPAttributes
2942
public static let httpResponseContentLengthUncompressed = "http.response_content_length_uncompressed"
43+
/// - See: HTTPAttributes
3044
public static let httpServerName = "http.server_name"
45+
/// - See: HTTPAttributes
3146
public static let httpServerRoute = "http.route"
47+
/// - See: HTTPAttributes
3248
public static let httpServerClientIP = "http.client_ip"
3349
}
3450

Sources/OpenTelemetryInstrumentationSupport/SpanAttribute+NetSemantics.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@
1414
import TracingInstrumentation
1515

1616
extension SpanAttributeName {
17+
/// - See: NetAttributes
1718
public static let netTransport = "net.transport"
19+
/// - See: NetAttributes
1820
public static let netPeerIP = "net.peer.ip"
21+
/// - See: NetAttributes
1922
public static let netPeerPort = "net.peer.port"
23+
/// - See: NetAttributes
2024
public static let netPeerName = "net.peer.name"
25+
/// - See: NetAttributes
2126
public static let netHostIP = "net.host.ip"
27+
/// - See: NetAttributes
2228
public static let netHostPort = "net.host.port"
29+
/// - See: NetAttributes
2330
public static let netHostName = "net.host.name"
2431
}
2532

Sources/OpenTelemetryInstrumentationSupport/SpanAttribute+PeerSemantics.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import TracingInstrumentation
1515

1616
extension SpanAttributeName {
17+
/// - See: PeerAttributes
1718
public static let peerService = "peer.service"
1819
}
1920

0 commit comments

Comments
 (0)