diff --git a/qlog/trace.go b/qlog/trace.go index fbd7e739..bb1d5bb8 100644 --- a/qlog/trace.go +++ b/qlog/trace.go @@ -18,10 +18,19 @@ func (l topLevel) MarshalJSONObject(enc *gojay.Encoder) { enc.StringKey("qlog_format", "NDJSON") enc.StringKey("qlog_version", "draft-02") enc.StringKeyOmitEmpty("title", "quic-go qlog") - enc.StringKey("code_version", quicGoVersion) + enc.ObjectKey("configuration", configuration{Version: quicGoVersion}) enc.ObjectKey("trace", l.trace) } +type configuration struct { + Version string +} + +func (c configuration) IsNil() bool { return false } +func (c configuration) MarshalJSONObject(enc *gojay.Encoder) { + enc.StringKey("code_version", c.Version) +} + type vantagePoint struct { Name string Type protocol.Perspective