Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion content/docs/http3/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ The code snippet shows all the knobs that need to be turned to send a request in
## 📝 Future Work {#future-work}

* Support for zstd Content Encoding: [#4100](https://github.com/quic-go/quic-go/issues/4100)
* qlog Support: [#4124](https://github.com/quic-go/quic-go/issues/4124)
* Happy Eyeballs Support: [#3755](https://github.com/quic-go/quic-go/issues/3755)
* Support for Extensible Priorities ([RFC 9218](https://www.rfc-editor.org/rfc/rfc9218.html)): [#3470](https://github.com/quic-go/quic-go/issues/3470)
* Use [`Early-Data` header field](https://datatracker.ietf.org/doc/html/rfc8470#section-5.1) for 0-RTT requests, retry on 425 response status: [#4381](https://github.com/quic-go/quic-go/issues/4381)
28 changes: 28 additions & 0 deletions content/docs/http3/qlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Event Logging using qlog
toc: true
weight: 90
---

quic-go logs HTTP/3 events defined in [draft-ietf-quic-qlog-h3-events](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-h3-events/), providing detailed insights into HTTP/3 frame processing and datagram handling. This complements the QUIC-layer events to give a complete picture of HTTP/3 connections.

## Enabling qlog for HTTP/3

HTTP/3 qlogging is enabled by setting the `Tracer` callback on the `quic.Config`, just like for QUIC connections. However, to log HTTP/3 events in addition to QUIC events, the tracer needs to support the HTTP/3 event schema.

The `http3/qlog` package provides `DefaultConnectionTracer`, which automatically includes both QUIC and HTTP/3 event schemas:

```go
import (
"github.com/quic-go/quic-go"
h3qlog "github.com/quic-go/quic-go/http3/qlog"
)

quic.Config{
Tracer: h3qlog.DefaultConnectionTracer,
}
```

This tracer writes qlog files to a directory specified by the `QLOGDIR` environment variable, if set. Each connection will produce a separate qlog file containing both QUIC and HTTP/3 events.

As described in the [qlog documentation]({{< relref "../quic/qlog.md" >}}), applications can implement the `quic.Config.Tracer` callback to add custom logic to the qlog tracing.
3 changes: 0 additions & 3 deletions content/docs/quic/qlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,3 @@ quic.Transport{
}
```

## 📝 Future Work

* qlog support for HTTP/3: [#4124](https://github.com/quic-go/quic-go/issues/4124)