TUN-6576: Consume cf-trace-id from incoming TCP requests to create root span

This commit is contained in:
Devin Carr
2022-07-26 14:00:53 -07:00
parent d96c39196d
commit f48a7cd3dd
13 changed files with 168 additions and 62 deletions

View File

@@ -132,7 +132,7 @@ func (c *HTTP2Connection) ServeHTTP(w http.ResponseWriter, r *http.Request) {
case TypeWebsocket, TypeHTTP:
stripWebsocketUpgradeHeader(r)
// Check for tracing on request
tr := tracing.NewTracedRequest(r)
tr := tracing.NewTracedHTTPRequest(r, c.log)
if err := originProxy.ProxyHTTP(respWriter, tr, connType == TypeWebsocket); err != nil {
err := fmt.Errorf("Failed to proxy HTTP: %w", err)
c.log.Error().Err(err)