Skip to content

feat(tracer): add new field instrumentation#48

Merged
zakahan merged 1 commit intovolcengine:mainfrom
zakahan:feat/metrics
Aug 13, 2025
Merged

feat(tracer): add new field instrumentation#48
zakahan merged 1 commit intovolcengine:mainfrom
zakahan:feat/metrics

Conversation

@zakahan
Copy link
Copy Markdown
Collaborator

@zakahan zakahan commented Aug 13, 2025

Add fields to the tracer attrabute

  • app.name: Add the app.name field in the agent_run, call_llm, and execute_tool stages respectively.
  • agent.name: Add the agent.name field in the agent_run, call_llm, and execute_tool stages respectively.
  • tool.name: Add the tool.name field in the execute_tool stage.

Special Instructions

  • Since app.name is a field at the runner level, in runner.py, the injection of app_name is achieved by adding the following code:
        if getattr(self.agent, "tracers", None):
            for tracers in self.agent.tracers:
                tracers.set_app_name(self.app_name)
  • Add after_tool_callback to implement field tracing of agent.name and app.name during the tool call stage

@zakahan zakahan requested a review from yaozheng-fang August 13, 2025 02:55
@zakahan zakahan merged commit 858b6b7 into volcengine:main Aug 13, 2025
5 checks passed
yaozheng-fang pushed a commit that referenced this pull request Aug 15, 2025
@zakahan zakahan deleted the feat/metrics branch August 21, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants