Repository navigation
G10 durable runtime observability correlation #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
delete-cloud
merged 2 commits into
main
from
codex/durable-runtime-g10-observability-correlation
May 18, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
coding-agent/.opencode/prompts/tasks/durable-runtime-observability-correlation.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| Goal: | ||
| Propagate durable runtime correlation identifiers into observability spans. | ||
|
|
||
| Scope: | ||
| - Add safe, low-cardinality runtime correlation attributes to AgentKit pipeline | ||
| stage and LLM generation spans. | ||
| - Include `tape_id` from the active tape. | ||
| - Forward only whitelisted `AgentRunContext.trace_metadata` correlation keys. | ||
| - Bind HTTP root runs to `turn_id` and `tape_id` trace metadata from | ||
| `SessionManager`. | ||
| - Keep OTLP/Langfuse exporter privacy filtering intact. | ||
|
|
||
| Out of scope: | ||
| - Do not add raw prompt, message, content, tool result, secret, or text values | ||
| to span attributes. | ||
| - Do not change trace id derivation. | ||
| - Do not change observability configuration defaults. | ||
| - Do not change runtime persistence or replay APIs. | ||
|
|
||
| Context: | ||
| - ADRs: | ||
| - `docs/adr/0029-durable-runtime-identity.md` | ||
| - `docs/adr/0028-observability-and-langfuse-integration.md` | ||
| - Postmortem patterns consulted: | ||
| - `postmortem/patterns/PM-0001-address-code-review-issues.md` | ||
| - `postmortem/patterns/PM-0006-add-usage-event-fields-and-fix-tool-name-kwarg-in-pipeline.md` | ||
| - `postmortem/patterns/PM-0009-preserve-neutral-bare-anchor-semantics.md` | ||
| - `postmortem/patterns/PM-0010-route-incremental-context-append-through-tapeview.md` | ||
| - Relevant files: | ||
| - `src/agentkit/runtime/pipeline.py` | ||
| - `src/coding_agent/ui/session_manager.py` | ||
| - `tests/agentkit/runtime/test_pipeline.py` | ||
| - `tests/ui/test_session_manager_runtime.py` | ||
| - `tests/coding_agent/test_observability.py` | ||
|
|
||
| Target tests: | ||
| - `uv run pytest tests/agentkit/runtime/test_pipeline.py -k "span" -v` | ||
| - `uv run pytest tests/agentkit/runtime/test_pipeline.py -v` | ||
| - `uv run pytest tests/agentkit/observability/test_core.py -v` | ||
| - `uv run pytest tests/ui/test_session_manager_runtime.py -k "run_id or approval or message_snapshot" -v` | ||
| - `uv run pytest tests/coding_agent/test_observability.py -v` | ||
| - `uv run ruff check src/agentkit/runtime/pipeline.py src/coding_agent/ui/session_manager.py tests/agentkit/runtime/test_pipeline.py tests/ui/test_session_manager_runtime.py tests/coding_agent/test_observability.py` | ||
| - `uv run ruff format --check src/agentkit/runtime/pipeline.py src/coding_agent/ui/session_manager.py tests/agentkit/runtime/test_pipeline.py tests/ui/test_session_manager_runtime.py tests/coding_agent/test_observability.py` | ||
|
|
||
| Stop conditions: | ||
| - Stop with a blocker if the work requires exporting raw prompt/message/result | ||
| data or weakening the existing OTLP denylist. | ||
| - Stop with a blocker if trace metadata needs a broader public API decision. | ||
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.