Skip to content

Commit

Permalink
contrib test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahkm committed Oct 25, 2024
1 parent 1eb3756 commit e6b61b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/labstack/echo.v4/echotrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func TestNoDebugStack(t *testing.T) {
span := spans[0]
require.NotNil(t, span.Tag(ext.ErrorMsg))
assert.Equal(errWant.Error(), span.Tag(ext.ErrorMsg))
assert.Empty(span.Tag(ext.ErrorStack))
assert.Empty(span.Tags()[ext.ErrorStack])
assert.Equal("labstack/echo.v4", span.Tag(ext.Component))
assert.Equal(ext.SpanKindServer, span.Tag(ext.SpanKind))
}
Expand Down
2 changes: 2 additions & 0 deletions instrumentation/httptrace/before_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func BeforeHandle(cfg *ServeConfig, w http.ResponseWriter, r *http.Request) (htt
if cfg.Route != "" {
opts = append(opts, tracer.Tag(ext.HTTPRoute, cfg.Route))
}
// Pre-append span.kind and component tags to the options so that they can be overridden.
opts = append([]tracer.StartSpanOption{tracer.Tag(ext.SpanKind, ext.SpanKindServer), tracer.Tag(ext.Component, "net/http")}, opts...)
span, ctx := StartRequestSpan(r, opts...)
rw, ddrw := wrapResponseWriter(w)
rt := r.WithContext(ctx)
Expand Down

0 comments on commit e6b61b2

Please sign in to comment.