@@ -365,17 +365,17 @@ func TestSetInternalSpanStatus(t *testing.T) {
365
365
{
366
366
name : "status.code is set as int" ,
367
367
attrs : pdata .NewAttributeMap ().InitFromMap (map [string ]pdata.AttributeValue {
368
- tracetranslator . TagStatusCode : pdata .NewAttributeValueInt (1 ),
368
+ conventions . OtelStatusCode : pdata .NewAttributeValueInt (1 ),
369
369
}),
370
370
status : okStatus ,
371
371
attrsModifiedLen : 0 ,
372
372
},
373
373
{
374
374
name : "status.code, status.message and error tags are set" ,
375
375
attrs : pdata .NewAttributeMap ().InitFromMap (map [string ]pdata.AttributeValue {
376
- tracetranslator .TagError : pdata .NewAttributeValueBool (true ),
377
- tracetranslator . TagStatusCode : pdata .NewAttributeValueInt (int64 (pdata .StatusCodeError )),
378
- tracetranslator . TagStatusMsg : pdata .NewAttributeValueString ("Error: Invalid argument" ),
376
+ tracetranslator .TagError : pdata .NewAttributeValueBool (true ),
377
+ conventions . OtelStatusCode : pdata .NewAttributeValueInt (int64 (pdata .StatusCodeError )),
378
+ conventions . OtelStatusDescription : pdata .NewAttributeValueString ("Error: Invalid argument" ),
379
379
}),
380
380
status : errorStatusWithMessage ,
381
381
attrsModifiedLen : 0 ,
@@ -401,7 +401,7 @@ func TestSetInternalSpanStatus(t *testing.T) {
401
401
{
402
402
name : "status.code has precedence over http.status_code." ,
403
403
attrs : pdata .NewAttributeMap ().InitFromMap (map [string ]pdata.AttributeValue {
404
- tracetranslator . TagStatusCode : pdata .NewAttributeValueInt (1 ),
404
+ conventions . OtelStatusCode : pdata .NewAttributeValueInt (1 ),
405
405
conventions .AttributeHTTPStatusCode : pdata .NewAttributeValueInt (500 ),
406
406
tracetranslator .TagHTTPStatusMsg : pdata .NewAttributeValueString ("Server Error" ),
407
407
}),
@@ -606,7 +606,7 @@ func generateProtoSpan() *model.Span {
606
606
VStr : string (tracetranslator .OpenTracingSpanKindClient ),
607
607
},
608
608
{
609
- Key : tracetranslator . TagStatusCode ,
609
+ Key : conventions . OtelStatusCode ,
610
610
VType : model .ValueType_INT64 ,
611
611
VInt64 : int64 (pdata .StatusCodeError ),
612
612
},
@@ -616,7 +616,7 @@ func generateProtoSpan() *model.Span {
616
616
VType : model .ValueType_BOOL ,
617
617
},
618
618
{
619
- Key : tracetranslator . TagStatusMsg ,
619
+ Key : conventions . OtelStatusDescription ,
620
620
VType : model .ValueType_STRING ,
621
621
VStr : "status-cancelled" ,
622
622
},
@@ -684,7 +684,7 @@ func generateProtoSpanWithTraceState() *model.Span {
684
684
VStr : string (tracetranslator .OpenTracingSpanKindClient ),
685
685
},
686
686
{
687
- Key : tracetranslator . TagStatusCode ,
687
+ Key : conventions . OtelStatusCode ,
688
688
VType : model .ValueType_INT64 ,
689
689
VInt64 : int64 (pdata .StatusCodeError ),
690
690
},
@@ -694,7 +694,7 @@ func generateProtoSpanWithTraceState() *model.Span {
694
694
VType : model .ValueType_BOOL ,
695
695
},
696
696
{
697
- Key : tracetranslator . TagStatusMsg ,
697
+ Key : conventions . OtelStatusDescription ,
698
698
VType : model .ValueType_STRING ,
699
699
VStr : "status-cancelled" ,
700
700
},
@@ -797,12 +797,12 @@ func generateProtoFollowerSpan() *model.Span {
797
797
VStr : string (tracetranslator .OpenTracingSpanKindConsumer ),
798
798
},
799
799
{
800
- Key : tracetranslator . TagStatusCode ,
800
+ Key : conventions . OtelStatusCode ,
801
801
VType : model .ValueType_INT64 ,
802
802
VInt64 : int64 (pdata .StatusCodeOk ),
803
803
},
804
804
{
805
- Key : tracetranslator . TagStatusMsg ,
805
+ Key : conventions . OtelStatusDescription ,
806
806
VType : model .ValueType_STRING ,
807
807
VStr : "status-ok" ,
808
808
},
0 commit comments