Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Expose SpanAttributes Keys #153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions Sources/Tracing/Span.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ extension SpanAttributes {
public func forEach(_ callback: (String, SpanAttribute) -> Void) {
self._attributes.forEach { callback($0.key, $0.1) }
}

/// Returns all attribute names.
public var keys: Dictionary<String, SpanAttribute>.Keys {
return self._attributes.keys
}

/// Returns true if the collection contains no attributes.
public var isEmpty: Bool {
Expand Down