We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4351cb3 commit 0f99c8aCopy full SHA for 0f99c8a
internal/global/trace_test.go
@@ -235,3 +235,12 @@ func TestSpanContextPropagatedWithNonRecordingSpan(t *testing.T) {
235
assert.Equal(t, sc, span.SpanContext())
236
assert.False(t, span.IsRecording())
237
}
238
+
239
+func TestStartSpanWithNilContext(t *testing.T) {
240
+ ResetForTest(t)
241
242
+ tr := TracerProvider().Tracer("NoPanic")
243
244
+ // nolint:staticcheck // no nil context, but that's the point of the test.
245
+ assert.NotPanics(t, func() { tr.Start(nil, "should-not-panic") })
246
+}
0 commit comments