Skip to content

Commit 6320805

Browse files
committed
Get adk sample working
1 parent 2c7d5f8 commit 6320805

File tree

4 files changed

+2016
-2562
lines changed

4 files changed

+2016
-2562
lines changed

adk-sql-agent/main.env

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
2-
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
2+
OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
3+
# OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=event_only
34

45
GOOGLE_GENAI_USE_VERTEXAI=TRUE
56
GOOGLE_CLOUD_LOCATION=us-central1
67

78
ENABLE_GCS_PYTHON_CLIENT_OTEL_TRACES=true
9+
10+
PORT=8000
11+
OTEL_INSTRUMENTATION_GENAI_UPLOAD_FORMAT='jsonl'
12+
GOOGLE_CLOUD_PROJECT=otel-starter-project
13+
OTEL_INSTRUMENTATION_GENAI_COMPLETION_HOOK=upload
14+
OTEL_INSTRUMENTATION_GENAI_UPLOAD_BASE_PATH="gs://otel-starter-project-genai-refs/v3"

adk-sql-agent/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ requires-python = ">=3.13"
2121
dependencies = [
2222
"fsspec>=2025.5.1",
2323
"gcsfs",
24-
"google-adk>=1.0.0",
24+
"google-adk~=1.14",
2525
"opentelemetry-exporter-gcp-logging>=1.9.0a0",
2626
"opentelemetry-exporter-gcp-monitoring>=1.9.0a0",
2727
"opentelemetry-exporter-otlp-proto-grpc>=1.33.1",

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ dependencies = [
6565
"opentelemetry-propagator-aws-xray",
6666
"opentelemetry-util-http",
6767
"opentelemetry-util-genai",
68+
"opentelemetry-instrumentation-google-genai[instruments]",
6869
"opentelemetry-instrumentation-vertexai[instruments]",
6970
"opentelemetry-instrumentation-openai-v2[instruments]",
7071
]
@@ -79,6 +80,7 @@ required-version = ">=0.6.0"
7980
[tool.uv.sources]
8081
opentelemetry-api = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-api" }
8182
opentelemetry-sdk = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-sdk" }
83+
opentelemetry-exporter-otlp-proto-grpc = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "exporter/opentelemetry-exporter-otlp-proto-grpc" }
8284
opentelemetry-semantic-conventions = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-semantic-conventions" }
8385
opentelemetry-test-utils = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "tests/opentelemetry-test-utils" }
8486
opentelemetry-exporter-prometheus-remote-write = { workspace = true }
@@ -136,13 +138,15 @@ opentelemetry-propagator-ot-trace = { workspace = true }
136138
opentelemetry-propagator-aws-xray = { workspace = true }
137139
opentelemetry-util-http = { workspace = true }
138140
opentelemetry-util-genai = { workspace = true }
141+
opentelemetry-instrumentation-google-genai = { workspace = true }
139142
opentelemetry-instrumentation-vertexai = { workspace = true }
140143
opentelemetry-instrumentation-openai-v2 = { workspace = true }
141144

142145
# https://docs.astral.sh/uv/reference/settings/#workspace
143146
[tool.uv.workspace]
144147
members = [
145148
"instrumentation/*",
149+
"adk-sql-agent",
146150
"instrumentation-genai/*",
147151
"exporter/*",
148152
"opentelemetry-instrumentation",

0 commit comments

Comments
 (0)