You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
fix wrong representation of status value in zipkin exporter (#3340)
* export status codes to upper case in zipkin exporter * add test cases for status UNSET and ERROR * Update exporters/zipkin/model.go correct the usage of case-sensitive terms Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> * change unit test cases to test exact behavior * move this PR to unrelease section in the CHANGELOG.md Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
zkmodel "github.com/openzipkin/zipkin-go/model"
|
||||
|
||||
@@ -209,7 +210,9 @@ func toZipkinTags(data tracesdk.ReadOnlySpan) map[string]string {
|
||||
}
|
||||
|
||||
if data.Status().Code != codes.Unset {
|
||||
m["otel.status_code"] = data.Status().Code.String()
|
||||
// Zipkin expect to receive uppercase status values
|
||||
// rather than default capitalized ones.
|
||||
m["otel.status_code"] = strings.ToUpper(data.Status().Code.String())
|
||||
}
|
||||
|
||||
if data.Status().Code == codes.Error {
|
||||
|
||||
Reference in New Issue
Block a user