Skip to content

Commit

Permalink
Fix ES OTEL status code (#2501)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay committed Sep 22, 2020
1 parent 9039481 commit 2e1b869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ func getTagFromSpanKind(spanKind pdata.SpanKind) (dbmodel.KeyValue, bool) {

func getTagFromStatusCode(statusCode pdata.StatusCode) (dbmodel.KeyValue, bool) {
return dbmodel.KeyValue{
Key: tracetranslator.TagStatusCode,
// TODO is this ok?
Key: tracetranslator.TagStatusCode,
Value: statusCode.String(),
Type: dbmodel.StringType,
}, true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestConvertSpan(t *testing.T) {
StartTimeMillis: 1,
Tags: []dbmodel.KeyValue{
{Key: "span.kind", Type: dbmodel.StringType, Value: "client"},
{Key: "status.code", Type: dbmodel.StringType, Value: "Cancelled"},
{Key: "status.code", Type: dbmodel.StringType, Value: "STATUS_CODE_CANCELLED"},
{Key: "error", Type: dbmodel.BoolType, Value: "true"},
{Key: "status.message", Type: dbmodel.StringType, Value: "messagetext"},
{Key: "foo", Type: dbmodel.BoolType, Value: "true"},
Expand Down

0 comments on commit 2e1b869

Please sign in to comment.