Index agent message consumption analytics - #30203
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Base automatically changed from
flav/build-consumption-analytics-tool-documents
to
main
August 7, 2026 15:54
Contributor
|
flvndvd
force-pushed
the
flav/ingest-agent-message-consumption-analytics
branch
from
August 10, 2026 08:37
e21e67d to
3b626fb
Compare
avervaet
approved these changes
Aug 10, 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.
Description
This PR indexes the consumption documents produced for each billed agent message. The existing attribution workflow now runs a second activity after attribution is stored, which loads the message data, builds its LLM and tool documents, and writes them to Elasticsearch.
Each indexing pass replaces the complete snapshot for the message. This prevents documents from an earlier message version from remaining in the index and being counted twice. Writes use deterministic IDs and failures are retried by Temporal.
It also ensures the authoritative bill and skill snapshot are persisted before attribution starts.
Tests
Risk
Deploy Plan