Source/Packages

Runtime.TelemetryRecord

packages/execution/src/Runtime/TelemetryRecord.alpha

774 lines93 declarations28.3 KiBSHA-256 d4129743e998

def · lines 282–394

telemetryRecordValue

Full file
282def telemetryRecordValue =
283  (lambda unrestricted value : (family TelemetryCaptureValue) .
284    (eliminate
285      TelemetryCaptureValue
286      (lambda unrestricted current : (family TelemetryCaptureValue) . (family TelemetryRecordParts))
287      value
288      (branch TelemetryConstant constant . (telemetryRecordLiteral (aosEncodeValue constant)))
289      (branch
290        TelemetryUnsigned
291        index
292        .
293        (telemetryRecordWrap b"{\"t\":\"u64\",\"v\":" (telemetryRecordDecimalPart 0 index) b"}"))
294      (branch
295        TelemetrySigned
296        index
297        .
298        (telemetryRecordWrap b"{\"t\":\"i64\",\"v\":" (telemetryRecordDecimalPart 1 index) b"}"))
299      (branch
300        TelemetryFloat32
301        index
302        .
303        (telemetryRecordWrap
304          b"{\"t\":\"f32\",\"bits\":"
305          (telemetryRecordHexPart
306            0
307            (telemetryCapturedWordAt index)
308            (naturalDivideUnchecked captureWordBytes 2)
309            1
310            0)
311          b"}"))
312      (branch
313        TelemetryFloat64
314        index
315        .
316        (telemetryRecordWrap
317          b"{\"t\":\"f64\",\"bits\":"
318          (telemetryRecordHexPart 0 (telemetryCapturedWordAt index) captureWordBytes 1 0)
319          b"}"))
320      (branch
321        TelemetryReference
322        kind
323        index
324        .
325        (telemetryRecordWrap
326          (bytes-append
327            b"{\"t\":\"ref\",\"kind\":"
328            (bytes-append (telemetryRecordString kind) b",\"id\":"))
329          (telemetryRecordHexPart 0 (telemetryCapturedWordAt index) telemetryIdentityBytes 0 1)
330          b"}"))
331      (branch
332        TelemetryBytes
333        index
334        width
335        .
336        (telemetryRecordWrap
337          b"{\"t\":\"bytes\",\"hex\":"
338          (telemetryRecordHexPart 0 (telemetryCapturedWordAt index) width 0 0)
339          b"}"))
340      (branch
341        TelemetryUnavailable
342        state
343        reason
344        .
345        (telemetryRecordLiteral
346          (bytes-append
347            b"{\"state\":"
348            (bytes-append
349              (telemetryRecordString state)
350              (bytes-append
351                b",\"reason\":{\"code\":"
352                (bytes-append (telemetryRecordString reason) b"}}"))))))
353      (branch
354        TelemetryList
355        items
356        induction
357        .
358        (telemetryRecordWrap b"{\"t\":\"list\",\"v\":[" induction b"]}"))
359      (branch TelemetryItemsEnd . (constructor TelemetryRecordParts TelemetryRecordEnd))
360      (branch
361        TelemetryItemsNext
362        head
363        tail
364        headInduction
365        tailInduction
366        .
367        (telemetryRecordAppend
368          headInduction
369          (telemetryRecordAppend
370            (telemetryRecordLiteral (telemetryRecordSeparator tail))
371            tailInduction)))
372      (branch
373        TelemetryMap
374        members
375        induction
376        .
377        (telemetryRecordWrap b"{\"t\":\"map\",\"v\":{" induction b"}}"))
378      (branch TelemetryMembersEnd . (constructor TelemetryRecordParts TelemetryRecordEnd))
379      (branch
380        TelemetryMembersNext
381        key
382        head
383        tail
384        headInduction
385        tailInduction
386        .
387        (telemetryRecordWrap
388          (bytes-append (telemetryRecordString key) b":")
389          (telemetryRecordAppend
390            headInduction
391            (telemetryRecordAppend
392              (telemetryRecordLiteral (telemetryRecordSeparator tail))
393              tailInduction))
394          b""))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.