Closed ktoso closed 1 year ago
It is explicitly like this:
public enum SpanAttribute: Equatable {
public typealias Key = SpanAttributeKey
case int32(Int32)
case int64(Int64)
case int32Array([Int32])
case int64Array([Int64])
case double(Double)
case doubleArray([Double])
case bool(Bool)
case boolArray([Bool])
case string(String)
case stringArray([String])
case __DO_NOT_SWITCH_EXHAUSTIVELY_OVER_THIS_ENUM <<<<<<<<<<<<<
case stringConvertible(CustomStringConvertible & Sendable)
case stringConvertibleArray([CustomStringConvertible & Sendable])
so I think this is okey for future extension.
Switching over it is useful because implementations need to know what to emit to their underlying systems
it has a case to allow future extension with
__DO_NOT_SWITCH_ADD_A_DEFAULT_CASE_PLZ
but consider if hiding it entirely is good or not.