File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Sources/Instrumentation/Tracing Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ extension SpanAttribute: ExpressibleByArrayLiteral {
165
165
public struct SpanAttributes {
166
166
private var _attributes = [ String: SpanAttribute] ( )
167
167
168
+ /// Create a set of attributes by wrapping the given dictionary.
169
+ /// - Parameter attributes: The attributes dictionary to wrap.
170
+ public init ( _ attributes: [ String : SpanAttribute ] ) {
171
+ self . _attributes = attributes
172
+ }
173
+
168
174
/// Accesses the `SpanAttribute` with the given name for reading and writing.
169
175
/// - Parameter name: The name of the attribute used to identify the attribute.
170
176
/// - Returns: The `SpanAttribute` identified by the given name, or `nil` if it's not present.
You can’t perform that action at this time.
0 commit comments