feat(grok-build): coding agent observability#171
Open
fangxiu-wf wants to merge 1 commit into
Open
Conversation
Adds grok-build (Grok CLI) coding agent observability — hook processor
parses grok transcript turns into a 5-level span tree (ENTRY -> AGENT ->
STEP -> LLM/TOOL) and emits ARMS GenAI semantic attributes.
Core changes:
- src/inputs/grok-build-log/grok-build-log-input.ts: transcript tailing input
- assets/hooks/grok-build-{hook-processor.mjs, transcript-parser.mjs, state.mjs}
+ grok-build-loongsuite-pilot-hook.sh launcher
- agents.d/grok-build.json: agent registration
- flusher/otlp-trace: AgentSpanEnrichingHandler injects gen_ai.agent.* +
gen_ai.data_source.id + acs.* resource attrs + cache_creation tokens
- F1/F3a: token usage alignment + system_instructions array shape
- F2/F4/F6/F8: tool pairing / finish_reason / result structure alignment
with semconv
- R2 Step C: AGENT span aggregation fields (input/output token sums,
cache_creation_read, cache_read across child LLM spans)
Tests: grok-build hook 41/41 + flusher 104/104 unit PASS.
E2E: 3 scenarios (long conversation / error path / concurrent sessions)
all PASS; validate-trace 0 ERROR on real grok 0.2.101 (5bc4b5dfad) CLI.
Known non-blocking:
- STEP count for long-conversation < 20 threshold (grok batches Read/Grep
into single turns); data quality PASS.
- OTLP flusher ECONNREFUSED 4318 (local OTEL collector not started);
otlp-debug dump used for validation; non-regression vs prior rounds.
Co-Authored-By: fangxiu-wf <fangxiu.wf@alibaba-inc.com>
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.
Summary
grok-build (Grok CLI) coding agent 可观测接入。Hook processor 解析 grok transcript turns 生成 5 层 span 树(ENTRY → AGENT → STEP → LLM/TOOL),注入 ARMS GenAI 语义属性。
重建说明:原 PR #159 因 GitHub 不允许修改 PR creator 字段(原 creator = rangemer333-cell),已关闭,由 fangxiu-wf 重建本 PR。commit author 已是 fangxiu-wf。本 PR 已合并原 #158 / #160 / #161 的全部净增量(squash 成单 commit
960403b,base=main)。Core Changes
gen_ai.agent.*+gen_ai.data_source.id+acs.*resource attrs +cache_creationtokenssystem_instructions数组形状Files Changed
52 files / +6796 / -377
Validation
Known Non-blocking