State the rules a reader follows on the format pages - #47
Merged
Merged
Conversation
The formats are JSON lines and JSON, and a reader in another language, such as the SkyWalking OAP, builds the same asz.view document from the same files. Where a page did not state a rule, such a reader had to find it in asz's Go code, and ended up copying what Go's libraries do. The pages now state these rules, so a reader follows the pages. - Session Data: the type of every record, part and dropped field, and of the usage values; a null is a field left out; a reader ignores a field the page does not list; asz's reader stops at a line it cannot decode. Times are RFC 3339 with a four-digit year, compared as instants. - Session Flow: attrs keys and ids sort in code point order, which the page defines, and the provider_bodies rule asz's reader already applies. - asz.view: times round down to the millisecond; header times are null or 0; attrs and data are as written; a data part's text; white space is Unicode's White_Space property; which records give a call its result; how request_to_result_ms is cut. Documentation only. The formats stay sd/1, sf/1 and asz.view 1.0.
The counts in usage leave out a count of zero, a dropped entry holds its what and bytes, and why when there is one, and a field the Session Data page does not list is not copied. A reader in another language needs this to write the same document.
A view writes each tree down to twelve levels below its root, a talk or an entry of loose, and leaves a deeper node out. The page said the document holds every run and step, which is true only within that depth. No talk measured has more than three levels.
Merged
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The formats are JSON lines and JSON. A reader in another language, such as the SkyWalking OAP, builds the same
asz.viewdocument from the same files. Where the pages did not state a rule, such a reader had to find it in asz's Go code, and ended up copying what Go's libraries do: how Go decodes a null inside a list, which integer type a field has, how it trims white space, how it rounds a time to milliseconds, and how it orders map keys. The pages now state these rules, so a reader follows the pages and never the code.What changes
Documentation only. No code, key or format changes; the formats stay
sd/1,sf/1andasz.view1.0.usagevalues. A null is a field left out, and a reader ignores a field the page does not list, so a later version can add one. An integer is a whole number that fits in 64 bits with its sign, andordandoffare never negative. asz's reader stops at a line it cannot decode, as at a line that is not JSON. Atimeis RFC 3339 with a four-digit year, and times compare as the instants they name, with examples where the text order is the reverse. A reader does not have to copy what asz's code does with input asz never writes.attrskeys are written sorted, and ids and keys sort in code point order, which the page defines. The rejection list gains theprovider_bodiesrule thatProviderBodiesOfalready applies, with null read as no bodies.attrsare as the round wrote them; a data part's text is the record's readable text when it has one, a queued command's prompt included, and otherwise the data as written; white space is Unicode'sWhite_Spaceproperty; which records give a call itsresult,result_state,result_bytesandfailed;request_to_result_msdrops the rest of a millisecond;usageleaves out a count of zero, a dropped entry holds itswhat,bytesandwhy, and a field Session Data does not list is not copied.Each statement was checked against the code on
main:pkg/sessiondata(Record,Part,Drop,Usage,Reader.Nextand its callers ininternal/view),pkg/sessionflow(ProviderBodiesOf,checkRefs, the frame sort) andinternal/view(Millis,millisPtr,durationMillis,fill,fillResult,readable,withoutProviderBodies,shortName). GPT-6 reviewed the pages against that code in two rounds; its three findings on them are fixed.Tests
make checkpasses.