Skip to content

Commit

Permalink
[#396] Fix missing span end in httptrace
Browse files Browse the repository at this point in the history
Signed-off-by: Hui Kang <[email protected]>
  • Loading branch information
Hui Kang committed Dec 23, 2019
1 parent 99cb01b commit 5580980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugin/httptrace/clienttrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func NewClientTrace(ctx context.Context) *httptrace.ClientTrace {

ct.tr = global.TraceProvider().Tracer("go.opentelemetry.io/otel/plugin/httptrace")
ct.start("http.request", "http.request")
defer ct.end("http.request", nil)

return &httptrace.ClientTrace{
GetConn: ct.getConn,
Expand Down
3 changes: 3 additions & 0 deletions plugin/httptrace/clienttrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func TestHTTPRequestWithClientTrace(t *testing.T) {
{
name: "go.opentelemetry.io/otel/plugin/httptrace/http.receive",
},
{
name: "go.opentelemetry.io/otel/plugin/httptrace/http.request",
},
{
name: "go.opentelemetry.io/otel/plugin/httptrace/http.send",
},
Expand Down

0 comments on commit 5580980

Please sign in to comment.