1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-08-15 20:03:15 +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

@@ -26,6 +26,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
The functions from that package should be used instead. (#2166)
- The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated.
Use the typed `*Slice` functions and types added to the package instead. (#2162)
- The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated.
Use the typed functions instead. (#2181)
### Removed

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>")