1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-16 02:47:20 +02:00

Ensure clientTracer closes http.headers span (#912)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Anthony Mirabella 2020-07-07 13:08:40 -04:00 committed by GitHub
parent 463c458daf
commit 1c6ca87dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881)
- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908)
- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912)
## [0.7.0] - 2020-06-26

View File

@ -203,6 +203,9 @@ func (ct *clientTracer) wroteHeaderField(k string, v []string) {
}
func (ct *clientTracer) wroteHeaders() {
if ct.span("http.headers") != nil {
ct.end("http.headers", nil)
}
ct.start("http.send", "http.send")
}

View File

@ -121,6 +121,10 @@ func TestHTTPRequestWithClientTrace(t *testing.T) {
name: "http.receive",
parent: "test",
},
{
name: "http.headers",
parent: "test",
},
{
name: "http.send",
parent: "test",