Optimize agentic trace ingestion without changing payloads - #672
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What changed
agentic_<suffix>/conc_<N>/aiperf_artifactsuploads before considering their duplicatemultinode_server_logstarballs.Why
Run 30781275770 expanded approximately 92.8 GiB of trace data a second time from nested server-log archives, consuming roughly 56 minutes and causing smaller runners to run out of disk. Each oversized server-metrics document was then independently decompressed and tokenized three times: aggregate metrics, chart profiling metrics, and chart warmup metrics.
The producer copies the same completed logs directory into both artifact families. As an external verification, the direct and nested copies from run 30781275770, concurrency 1, had identical SHA-256 hashes for
profile_export.jsonl,server_metrics_export.csv, andserver_metrics_export.json.Functional-safety checks
aggregate_stats,chart_series, andrequest_timelinepayloads.Validation
bun run test:unit— 3,574 tests passed across all workspacesbun run fmtbun run lintbun run typecheckgit diff --checkNote
Medium Risk
ETL behavior changes could alter discovery or derived JSON if equivalence assumptions fail, but extensive byte-for-byte tests and preserved fallback paths mitigate regressions on ingest-critical paths.
Overview
Speeds up agentic trace ingest by avoiding duplicate disk expansion and repeated parsing of huge server-metrics JSON, while keeping stored
aggregate_stats,chart_series, andrequest_timelinebyte-equivalent to the old path.Artifact discovery now indexes complete direct uploads under
agentic_<suffix>/conc_<N>/before touchingmultinode_server_logs_*.tar.gz, and skips tarball extraction when that concurrency already has all three trace files. Incomplete direct layouts still use the archive fallback.Derived payload computation routes
insertTraceReplay()through newcomputeTraceDerivedPayloads(), which parses server metrics once viacollectMetricPhases()(single gunzip + token stream tee’d tometricsandwarmup_metrics). Shared helperswithServerMetricAggregateStats()andcomputeChartSeriesFromMetricPhases()feed aggregate and chart generation from the same parse; bounded vs streaming metric key selection and per-payload error isolation match the previous three independent calls.Tests assert JSON equivalence (including forced streaming), malformed-input behavior, and discovery skip/fallback rules.
Reviewed by Cursor Bugbot for commit 1327c67. Bugbot is set up for automated code reviews on this repo. Configure here.