1
0
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:
ReStartercc
2022-10-28 12:22:18 +08:00
committed by GitHub
parent 94ae231180
commit 3dd4e816a6
4 changed files with 215 additions and 15 deletions
+4 -1
View File
@@ -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 {