feat(temporal_worker): add optional metrics_headers param to AgentexWorker and get_temporal_client - #500
Closed
alvinkam2001 wants to merge 3 commits into
Closed
feat(temporal_worker): add optional metrics_headers param to AgentexWorker and get_temporal_client#500alvinkam2001 wants to merge 3 commits into
alvinkam2001 wants to merge 3 commits into
Conversation
…in span data (#469) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Nitesh Dhanpal <NiteshDhanpal@users.noreply.github.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
|
This PR is targeting The
See |
| output_data["tool_outputs"] = tool_outputs | ||
|
|
||
| span.output = output_data | ||
| lineage_refs = resolve_refs_from_items(new_items) |
There was a problem hiding this comment.
When a Temporal model invocation receives a registered function_call in its input and the response does not repeat it in new_items, lineage resolution examines only new_items, causing the span to record the call in tool_calls while omitting its registered data-source references.
Suggested change
| lineage_refs = resolve_refs_from_items(new_items) | |
| lineage_refs = resolve_refs_from_items([*new_items, *tool_calls]) |
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/core/temporal/plugins/openai_agents/models/temporal_streaming_model.py
Line: 1261
Comment:
**Input tool lineage is dropped**
When a Temporal model invocation receives a registered `function_call` in its input and the response does not repeat it in `new_items`, lineage resolution examines only `new_items`, causing the span to record the call in `tool_calls` while omitting its registered data-source references.
```suggestion
lineage_refs = resolve_refs_from_items([*new_items, *tool_calls])
```
**Knowledge Base Used:**
- [Agent framework integrations](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/agent-framework-integrations.md)
- [Tracing pipeline](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/tracing-pipeline.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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.
Greptile Summary
The PR adds authenticated Temporal metrics-export configuration and introduces data-source lineage metadata across ADK, harness, provider, and tracing paths. It also stamps agent versions onto SGP spans.
metrics_headersforwarding to Temporal OpenTelemetry configuration.AGENT_VERSIONto emitted SGP span metadata and expands tracing tests.Confidence Score: 4/5
The Temporal streaming lineage path should be fixed before merging because it records input tool calls on spans while dropping their registered data-source references.
The new lineage integration passes only response-derived items to the resolver even though the same code separately extracts input function calls, causing those calls to reach the tracing backend without their expected lineage metadata.
Files Needing Attention: src/agentex/lib/core/temporal/plugins/openai_agents/models/temporal_streaming_model.py
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Tool[Registered tool and data-source refs] --> Registry[Process lineage registry] Call[Function-call item] --> Resolver[Resolve and deduplicate refs] Registry --> Resolver Resolver --> Span[Attach sgp.lineage.refs to span data] Span --> Processor[SGP tracing processor] Processor --> Backend[Tracing backend]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "add optional metrics_headers param to Ag..." | Re-trigger Greptile
Context used (3)