Skip to content

Commit

Permalink
make responseWriterWithSize satisfy Flusher()
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffy-mathew committed Nov 21, 2024
1 parent 545b959 commit 2d2c049
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trace/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func (rw *responseWriterWithSize) Write(p []byte) (int, error) {
return n, err
}

func (rw *responseWriterWithSize) Flush() {
rw.ResponseWriter.(http.Flusher).Flush()
}

// NewHTTPHandler wraps the provided http.Handler with one that starts a span
// and injects the span context into the outbound request headers.
// You need to initialize the TracerProvider first since it utilizes the underlying
Expand Down

0 comments on commit 2d2c049

Please sign in to comment.