You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-27 22:49:15 +02:00
Use semconv creation functions (#3683)
This commit is contained in:
@@ -1235,8 +1235,8 @@ func TestRecordError(t *testing.T) {
|
||||
Name: semconv.ExceptionEventName,
|
||||
Time: errTime,
|
||||
Attributes: []attribute.KeyValue{
|
||||
semconv.ExceptionTypeKey.String(s.typ),
|
||||
semconv.ExceptionMessageKey.String(s.msg),
|
||||
semconv.ExceptionType(s.typ),
|
||||
semconv.ExceptionMessage(s.msg),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1279,8 +1279,8 @@ func TestRecordErrorWithStackTrace(t *testing.T) {
|
||||
Name: semconv.ExceptionEventName,
|
||||
Time: errTime,
|
||||
Attributes: []attribute.KeyValue{
|
||||
semconv.ExceptionTypeKey.String(typ),
|
||||
semconv.ExceptionMessageKey.String(msg),
|
||||
semconv.ExceptionType(typ),
|
||||
semconv.ExceptionMessage(msg),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1502,8 +1502,8 @@ func TestSpanCapturesPanic(t *testing.T) {
|
||||
require.Len(t, spans[0].Events(), 1)
|
||||
assert.Equal(t, spans[0].Events()[0].Name, semconv.ExceptionEventName)
|
||||
assert.Equal(t, spans[0].Events()[0].Attributes, []attribute.KeyValue{
|
||||
semconv.ExceptionTypeKey.String("*errors.errorString"),
|
||||
semconv.ExceptionMessageKey.String("error message"),
|
||||
semconv.ExceptionType("*errors.errorString"),
|
||||
semconv.ExceptionMessage("error message"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user