qlogwriter: add support for event_schemas in the trace header (#5361)

This commit is contained in:
Marten Seemann
2025-10-09 12:07:23 +08:00
committed by GitHub
parent 33af12712e
commit c26e86c547
7 changed files with 62 additions and 10 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/quic-go/quic-go"
"github.com/quic-go/quic-go/internal/utils"
"github.com/quic-go/quic-go/qlog"
"github.com/quic-go/quic-go/qlogwriter"
)
@@ -45,7 +46,12 @@ func NewQLOGConnectionTracer(_ context.Context, isClient bool, connID quic.Conne
return nil
}
log.Printf("Created qlog file: %s\n", path)
fileSeq := qlogwriter.NewConnectionFileSeq(utils.NewBufferedWriteCloser(bufio.NewWriter(f), f), isClient, connID)
fileSeq := qlogwriter.NewConnectionFileSeq(
utils.NewBufferedWriteCloser(bufio.NewWriter(f), f),
isClient,
connID,
[]string{qlog.EventSchema},
)
go fileSeq.Run()
return fileSeq
}