mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat(otel): add --otel_to_cloud experimental support
Cloud Trace, Cloud Monitoring and Cloud Logging integrations are set up via OTel if otel_to_cloud CLI param/fast_api arg is provided. This is similar to current Cloud Trace integration via trace_to_cloud, just extended to Monitoring and Logging as well. PiperOrigin-RevId: 807385680
This commit is contained in:
committed by
Copybara-Service
parent
d6d4b144e9
commit
1ae0b82f56
@@ -17,10 +17,10 @@ from typing import Dict
|
||||
from typing import Optional
|
||||
from unittest import mock
|
||||
|
||||
from google.adk import telemetry
|
||||
from google.adk.agents.llm_agent import Agent
|
||||
from google.adk.events.event import Event
|
||||
from google.adk.flows.llm_flows.functions import handle_function_calls_async
|
||||
from google.adk.telemetry import tracing
|
||||
from google.adk.tools.function_tool import FunctionTool
|
||||
from google.genai import types
|
||||
|
||||
@@ -65,7 +65,7 @@ async def test_simple_function_with_mocked_tracer(monkeypatch):
|
||||
mock_start_as_current_span_func.return_value = returned_context_manager_mock
|
||||
|
||||
monkeypatch.setattr(
|
||||
telemetry.tracer, 'start_as_current_span', mock_start_as_current_span_func
|
||||
tracing.tracer, 'start_as_current_span', mock_start_as_current_span_func
|
||||
)
|
||||
|
||||
mock_adk_trace_tool_call = mock.Mock()
|
||||
|
||||
Reference in New Issue
Block a user