You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
attribute: change INVALID Type to EMPTY and mark INVALID as deprecated (#8038)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7932 Noticeable comment from previous PR: https://github.com/open-telemetry/opentelemetry-go/pull/7942#discussion_r2913179215 Print the empty value as empty string per https://opentelemetry.io/docs/specs/otel/common/#empty-values
This commit is contained in:
+1
-1
@@ -390,7 +390,7 @@ func (a KeyValue) String() string {
|
||||
// ValueFromAttribute converts [attribute.Value] to [Value].
|
||||
func ValueFromAttribute(value attribute.Value) Value {
|
||||
switch value.Type() {
|
||||
case attribute.INVALID:
|
||||
case attribute.EMPTY:
|
||||
return Value{}
|
||||
case attribute.BOOL:
|
||||
return BoolValue(value.AsBool())
|
||||
|
||||
Reference in New Issue
Block a user