Follow OTel semantic conventions for root span naming
This commit is contained in:
parent
fd8a64ca95
commit
fcae39bf13
6 changed files with 59 additions and 22 deletions
|
|
@ -30,7 +30,7 @@ func TestNewRouter(t *testing.T) {
|
|||
routerRule: "Path(`/`)",
|
||||
expected: []expected{
|
||||
{
|
||||
name: "EntryPoint",
|
||||
name: "GET",
|
||||
attributes: []attribute.KeyValue{
|
||||
attribute.String("span.kind", "server"),
|
||||
},
|
||||
|
|
@ -63,7 +63,7 @@ func TestNewRouter(t *testing.T) {
|
|||
req.Header.Set("User-Agent", "router-test")
|
||||
|
||||
tracer := &mockTracer{}
|
||||
tracingCtx, entryPointSpan := tracer.Start(req.Context(), "EntryPoint", trace.WithSpanKind(trace.SpanKindServer))
|
||||
tracingCtx, entryPointSpan := tracer.Start(req.Context(), http.MethodGet, trace.WithSpanKind(trace.SpanKindServer))
|
||||
defer entryPointSpan.End()
|
||||
|
||||
req = req.WithContext(tracingCtx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue