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

Add support for int32 in attribute.Any (#2169)

* Support int32 for Any func in attribute pkg

* Add changes to changelog

* Update PR number in CHANGELOG.md
This commit is contained in:
Tyler Yahn
2021-08-11 09:32:00 -07:00
committed by GitHub
parent 2b0e139e10
commit 5d25c4d20e
2 changed files with 2 additions and 3 deletions

View File

@@ -92,9 +92,7 @@ func Any(k string, value interface{}) KeyValue {
return Array(k, value)
case reflect.Bool:
return Bool(k, rv.Bool())
case reflect.Int, reflect.Int8, reflect.Int16:
return Int(k, int(rv.Int()))
case reflect.Int64:
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return Int64(k, rv.Int())
case reflect.Float64:
return Float64(k, rv.Float())