Skip to content

Commit 9b67803

Browse files
committed
Remove manual tracing of tool calls
1 parent b4f77d6 commit 9b67803

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

samples/adk-sql-agent/sql_agent/tools.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class SqlRunResult(TypedDict):
3333
rows: NotRequired[list[tuple[str, ...]]]
3434
"""The rows returned by the SQL query"""
3535

36-
# [START opentelemetry_adk_agent_span]
37-
@tracer.start_as_current_span("create_database")
3836
def create_database_tool(tool_context: ToolContext) -> dict[str, Any]:
3937
"""Creates a temporary file in the /tmp directory to hold an ephemeral
4038
sqlite3 database if a database is not found for the current session.
@@ -47,9 +45,7 @@ def create_database_tool(tool_context: ToolContext) -> dict[str, Any]:
4745
tool_context.state[SESSION_DB_KEY] = path
4846
return {"resp": "Created an ephemeral database"}
4947
return {"resp": f"Skipping database creation, {tool_context.state[SESSION_DB_KEY]} already exists"}
50-
# [END opentelemetry_adk_agent_span]
5148

52-
@tracer.start_as_current_span("run_sql")
5349
def run_sql_tool(sql_query: str, tool_context: ToolContext) -> dict[str, Any]:
5450
"""Runs a SQLite query. The SQL query can be DDL or DML. Returns the rows if it's a SELECT query."""
5551
current_session_db_path = tool_context.state.get(SESSION_DB_KEY)

0 commit comments

Comments
 (0)