1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-02-09 13:37:12 +02:00

Fix String in Infer (#746)

This commit is contained in:
Vladimir Mihailenco 2020-05-19 19:10:30 +03:00 committed by GitHub
parent 51ff97e534
commit 9adedba214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ func Infer(k string, value interface{}) KeyValue {
case reflect.Float64:
return Float64(k, rv.Float())
case reflect.String:
return String(k, rv.Interface().(string))
return String(k, rv.String())
}
return String(k, fmt.Sprint(rv.Interface()))
return String(k, fmt.Sprint(value))
}