Skip to content

Commit

Permalink
Check marshalled value instead of iface (#1299)
Browse files Browse the repository at this point in the history
* Check marshalled value

Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>

* Move change to Fixed section

Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
  • Loading branch information
dstdfx and MrAlias authored Nov 2, 2020
1 parent 238d2c0 commit 911d7be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixed

- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258)
- Fix condition in `label.Any`. (#1299)

## [0.13.0] - 2020-10-08

Expand Down
2 changes: 1 addition & 1 deletion label/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func Any(k string, value interface{}) KeyValue {
case reflect.String:
return String(k, rv.String())
}
if b, err := json.Marshal(value); value != nil && err == nil {
if b, err := json.Marshal(value); b != nil && err == nil {
return String(k, string(b))
}
return String(k, fmt.Sprint(value))
Expand Down

0 comments on commit 911d7be

Please sign in to comment.