You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	Deprecate the attribute.Any function (#2181)
* Deprecate the attribute.Any func * Update CHANGELOG.md
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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>") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user