Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[otelhttp] Remove propagation header injection #2180

Merged
merged 4 commits into from Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions instrumentation/net/http/otelhttp/test/handler_test.go
Expand Up @@ -91,9 +91,6 @@ func TestHandlerBasics(t *testing.T) {
if got, expected := rr.Result().StatusCode, http.StatusOK; got != expected {
t.Fatalf("got %d, expected %d", got, expected)
}
if got := rr.Header().Get("Traceparent"); got == "" {
t.Fatal("expected non empty trace header")
}

spans := spanRecorder.Ended()
if got, expected := len(spans), 1; got != expected {
Expand Down
1 change: 0 additions & 1 deletion instrumentation/net/http/otelhttp/wrap.go
Expand Up @@ -91,6 +91,5 @@ func (w *respWriterWrapper) WriteHeader(statusCode int) {
}
w.wroteHeader = true
w.statusCode = statusCode
w.props.Inject(w.ctx, propagation.HeaderCarrier(w.Header()))
w.ResponseWriter.WriteHeader(statusCode)
}