Repository navigation
Add OpenTelemetry Tracing Support for BYO LangGraph Agents - #917
Closed
rishabh998186 wants to merge 3 commits into
Closed
rishabh998186 wants to merge 3 commits into
rishabh998186 wants to merge 3 commits into
Conversation
rishabh998186
requested review from
EItanya,
peterj and
yuval-k
as code owners
September 20, 2025 07:37
…to avoid double instrumentation; add README tracing docs Signed-off-by: rishabh998186 <rishabh998186@gmail.com>
krisztianfekete
left a comment
Contributor
There was a problem hiding this comment.
Thank you for opening this PR! I added some questions.
Signed-off-by: rishabh998186 <rishabh998186@gmail.com>
Contributor
|
Hey there @rishabh998186. I Have been discussing with my colleague @krisztianfekete and he said that even after a few rounds of iteration this PR is not working as expected, so we will be moving forward with #927 instead of this PR. Please take a look at #928 to better understand our updated AI usage guidelines for PRs and issues. |
3 tasks done
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.
Problem
BYO LangGraph agents were not emitting traces because tracing wasn't initialized for their FastAPI app. Declarative/ADK agents did emit traces since their CLI initialized tracing.
Solution
Initialize OTEL tracing/logging inside KAgentApp.build() by calling configure_tracing from kagent.core. This instruments FastAPI, httpx, and GenAI SDKs when environment variables are set.
Changes
Configuration
Required:
Optional:
Testing
Files Modified
Risk Assessment
Low risk - tracing remains disabled unless explicitly enabled via environment variables.