1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-08-10 22:31:50 +02:00

Deprecate the attribute.Any function (#2181)

* Deprecate the attribute.Any func

* Update CHANGELOG.md
This commit is contained in:
Tyler Yahn
2021-08-13 08:57:33 -07:00
committed by GitHub
parent 4e8d667f6e
commit 41588fea26
2 changed files with 4 additions and 0 deletions

View File

@@ -97,6 +97,8 @@ func Array(k string, v interface{}) KeyValue {
// Any creates a new key-value pair instance with a passed name and
// automatic type inference. This is slower, and not type-safe.
//
// Deprecated: Use the typed functions instead.
func Any(k string, value interface{}) KeyValue {
if value == nil {
return String(k, "<nil>")