mirror of
https://github.com/sajari/docconv.git
synced 2026-10-18 22:51:09 +08:00
15 lines
313 B
Go
15 lines
313 B
Go
package cloudtrace
|
|
|
|
import "net/http"
|
|
|
|
type HTTPHandler struct {
|
|
// Handler to wrap.
|
|
Handler http.Handler
|
|
}
|
|
|
|
func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
ctx := contextWithTraceInfo(r.Context(), r.Header.Get(CloudTraceContextHeader))
|
|
|
|
h.Handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|