-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the Value
and KeyValue
types
#4914
Comments
Instead of panicking we could log an error and return a zero value? Maybe also return a default value in the case of something like |
For reference, the existing attribute package does not panic: https://github.com/open-telemetry/opentelemetry-go/blob/main/attribute/value.go |
Given the OTel Spec says
and what the existing attribute package does I support @MrAlias proposal:
Note It would be good describe it in |
reference: https://github.com/open-telemetry/opentelemetry-go/pull/4725/files#diff-6176e76e800e6ce0edb44f3d31adaca4602b7cc03cbe54f5ea233a7f2edd17a0
Value
typeKind
methodAsAny
methodAsString
methodAsInt64
methodAsBool
methodAsFloat64
methodAsBytes
methodAsSlice
methodAsMap
methodEmpty
methodEqual
methodStringValue
functionIntValue
functionInt64Value
functionFloat64Value
functionBoolValue
functionBytesValue
functionSliceValue
functionMapValue
functionKeyValue
typeEqual
methodString
functionInt64
functionInt
functionFloat64
functionBool
functionBytes
functionSlice
functionMap
functionThe text was updated successfully, but these errors were encountered: