Skip to content

Commit 07c6c57

Browse files
committed
make attribute key customization private for now
1 parent 7d774e4 commit 07c6c57

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

Sources/AsyncHTTPClient/HTTPClient.swift

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,35 +1089,29 @@ public final class HTTPClient: Sendable {
10891089
}
10901090
}
10911091

1092+
// TODO: Open up customization of keys we use?
10921093
/// Configuration for tracing attributes set by the HTTPClient.
1093-
public var attributeKeys: AttributeKeys
1094+
@usableFromInline
1095+
package var attributeKeys: AttributeKeys
10941096

10951097
public init() {
10961098
self._tracer = nil
10971099
self.attributeKeys = .init()
10981100
}
10991101

1100-
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1101-
public init(
1102-
tracer: (any Tracer)? = InstrumentationSystem.tracer,
1103-
attributeKeys: AttributeKeys = .init()
1104-
) {
1105-
self._tracer = tracer
1106-
self.attributeKeys = attributeKeys
1107-
}
1108-
11091102
/// Span attribute keys that the HTTPClient should set automatically.
11101103
/// This struct allows the configuration of the attribute names (keys) which will be used for the apropriate values.
1111-
public struct AttributeKeys: Sendable {
1112-
public var requestMethod: String = "http.request.method"
1113-
public var requestBodySize: String = "http.request.body.size"
1104+
@usableFromInline
1105+
package struct AttributeKeys: Sendable {
1106+
@usableFromInline package var requestMethod: String = "http.request.method"
1107+
@usableFromInline package var requestBodySize: String = "http.request.body.size"
11141108

1115-
public var responseBodySize: String = "http.response.size"
1116-
public var responseStatusCode: String = "http.status_code"
1109+
@usableFromInline package var responseBodySize: String = "http.response.size"
1110+
@usableFromInline package var responseStatusCode: String = "http.status_code"
11171111

1118-
public var httpFlavor: String = "http.flavor"
1112+
@usableFromInline package var httpFlavor: String = "http.flavor"
11191113

1120-
public init() {}
1114+
@usableFromInline package init() {}
11211115
}
11221116
}
11231117

0 commit comments

Comments
 (0)