qlog icon indicating copy to clipboard operation
qlog copied to clipboard

The `Summary` type is too poorly defined

Open LPardue opened this issue 3 years ago • 2 comments

QlogFile and QlogFileSeq contain summary?: Summary. However, https://quicwg.org/qlog/draft-ietf-quic-qlog-main-schema.html#section-3.1 states

As the summary field is highly deployment-specific, this document does not specify any default fields or their semantics.

It's not a problem to leave the Summary type open as you suggest. But it's not clear how I would represent this in an implementation. Is it an array of (String, Any) tuples, or something else?

LPardue avatar Nov 06 '21 13:11 LPardue

The original idea was to have this as a generic JSON Object (so not quite an array of (string, any) but rather a key-value object, which is kind of the same thing conceptually), as suggested by the example.

So in TypeScript, it might be better defined as summary?: Object or if we want to keep the Summary type, we'd get something like:

interface Summary {
  [key: string]: any;
}

(according to https://remarkablemark.org/blog/2021/08/19/typescript-type-plain-old-javascript-object/)

Not sure what that'll look like in CDDL, but will make sure to keep it into account when we do that work.

rmarx avatar Nov 09 '21 16:11 rmarx

Sgtm will review it once we get there

LPardue avatar Nov 09 '21 16:11 LPardue

Closing this since we want to delete the entire field, which resolves the comment.

LPardue avatar Jul 05 '23 01:07 LPardue