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:
parent
463c458daf
commit
1c6ca87dec
@ -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
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
|
||||
|
@ -121,6 +121,10 @@ func TestHTTPRequestWithClientTrace(t *testing.T) {
|
||||
name: "http.receive",
|
||||
parent: "test",
|
||||
},
|
||||
{
|
||||
name: "http.headers",
|
||||
parent: "test",
|
||||
},
|
||||
{
|
||||
name: "http.send",
|
||||
parent: "test",
|
||||
|
Loading…
Reference in New Issue
Block a user