telemetry: 6 audit gap fixes + composition-rollup ingestion - #345
Merged
Merged
Conversation
App (telemetryCollector + NativeProgramPreview):
- Add TelemetryCompositionSample + TelemetryCompositionMetrics types
- Add TelemetrySubsystem: 'composition'
- Add CompositionWindowAccumulator (bounded 1000 samples, emits per rollup window)
- Add TelemetryCollector.recordCompositionSample() and flushCompositionWindowsIfPending()
- Add 'composition-rollup' to PerfLogKind routing in mapEventToPerfLogKind()
- NativeProgramPreview: call recordCompositionSample() per evaluated scene with
visualLayerCount, mediaLayerCount, videoLayerCount, imageLayerCount,
textLayerCount, stickerLayerCount, activeAudioClipCount
— derived from scene.visualLayers (active render scene only, not clip metadata)
API (performanceStorageService + types + routes):
- Add CompositionMetrics interface to performance.ts with p50/p95/p99 percentiles
p' es n from session_perf_logs JSONB
- No schema migration needed — JSONB column accepts new event subtypes
Tests:
- telemetryCollector.test.ts: add 'aggregates evaluated media sta- telemetryCollector.test.ts: add 'aggregates evaluated media sta- telemetrentile shape,
and subsystem routing (16/16 pass)
theunavailableguy
approved these changes
Sep 20, 2026
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.
Implements all 6 telemetry audit gaps plus composition-rollup ingestion. Two commits, 18 files, passes pre-commit TS check and cargo check.
Commit 1 — Fill 6 audit gaps
Fix 1 — Audio seek & underrun telemetry
seek_count+seek_latency_total_usatomics onNativeAudioClock;seek()records count and cumulative latencytotal_underruns()accessor onAudioRingBufferConsumerNativeAudioStatusgainsseekCount,seekLatencyTotalUs,clockFreshnessUs?,medianCallbackIntervalUs?useAudioSyncEnginederives window-deltaseekCount/seekP95Msper 5 s sampleFix 2 — Filmstrip tile telemetry reaches NDJSON
perfLogServicecallsfilmstripTelemetry.getSummary()+clear()every flush interval as"filmstrip-rollup"; final window flushed at session closeFix 3 — Real Rust-side export timing
finalize_video_exportreturnsExportTimings(ffmpegFinalizeMs,avgFrameWriteMs, p95)videoExport.tsreplaces 60%/40% ratio placeholders with real measurementsFix 4 — Frontend A/V sync stats persist to NDJSON
uiPlayheadDrift,playheadPaintJitter,seekUserLatencydrained into"frontend-av-sync"entries each flush intervalstartSyncMetricsFlushLoopswitched to non-destructivesnapshot()to avoid racing with the drainFix 5 — Timeline edit telemetry
"timeline-edit"NDJSON entry with operation type, clip ID, from/to positions, success flag, wall-clock durationFix 6 — Real process RSS replaces hard-coded peakRamMb
get_process_memory_mbTauri command vialibc::getrusage(RUSAGE_SELF)perfLogServicepolls it every flush interval, tracks rolling peak; all 8 placeholder sites updatedCommit 2 — Composition-rollup ingestion + sticker-rollup DB fix
App side:
TelemetryCompositionSample+TelemetryCompositionMetricstypes with p50/p95/p99 per layer typeCompositionWindowAccumulator(bounded 1000 samples, one rollup per window)recordCompositionSample()called fromNativeProgramPreviewper evaluated render scene usingscene.visualLayers— active layers only, never clip metadata"composition-rollup"PerfLogKind routingAPI side (performanceStorageService + types):
CompositionMetricsinterface +compositionMetrics?onPerformanceEventPayload"sticker-rollup"and"composition-rollup"added to the DB ingestion whitelist in bothingestSession()andgetSessionEvents()session_perf_logsJSONB — fixedTests: telemetryCollector.test.ts 16/16 pass
No schema migration needed.