Skip to content

Conversation

@adharshctr
Copy link
Contributor

@adharshctr adharshctr commented Dec 3, 2025

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.
image

Important

Add support for Google ADK by updating Instruments enum and init_instrumentations() function.

  • Behavior:
    • Added GOOGLE_ADK to Instruments enum in instruments.py.
    • Updated init_instrumentations() in tracing.py to initialize GOOGLE_ADK using init_google_generativeai_instrumentor().
    • init_google_generativeai_instrumentor() now checks for google-adk package installation.
  • Misc:
    • No changes to existing functionality or other instruments.

This description was created by Ellipsis for 3f6b79f. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

Release Notes

  • New Features
    • Extended Google Generative AI instrumentation support to include Google ADK. The SDK now automatically instruments Google ADK alongside other Google Generative AI packages when detected.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Walkthrough

The pull request adds support for Google ADK instrumentation by introducing a new enum member GOOGLE_ADK to the Instruments class and modifying the tracing initialization logic to recognize and activate Google Generative AI instrumentation when the google-adk package is installed alongside existing google-generativeai variants.

Changes

Cohort / File(s) Summary
Instrumentation Enum Extension
packages/traceloop-sdk/traceloop/sdk/instruments.py
Added GOOGLE_ADK = "google_adk" enum member to the Instruments class.
Tracing Instrumentor Expansion
packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py
Extended Google Generative AI instrumentor initialization to group GOOGLE_ADK with GOOGLE_GENERATIVEAI, and expanded package availability detection to include google-adk alongside google-generativeai and google-genai.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • The enum addition is trivial and straightforward
  • The tracing.py changes extend existing conditional logic with an additional package check; verify that the grouping with GOOGLE_GENERATIVEAI is intentional and doesn't conflict with other instrumentor logic

Possibly related issues

Possibly related PRs

Poem

🐰 A new SDK friend arrives today,
Google ADK joins the fray!
With enum and trace in perfect pair,
One more package gets our care. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(google_generativeai): Added support for Google ADK' directly and clearly summarizes the main change - adding support for Google ADK to the Google Generative AI instrumentation.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f782741 and 3f6b79f.

📒 Files selected for processing (2)
  • packages/traceloop-sdk/traceloop/sdk/instruments.py (1 hunks)
  • packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: Store API keys only in environment variables/secure vaults; never hardcode secrets in code
Use Flake8 for code linting and adhere to its rules

Files:

  • packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py
  • packages/traceloop-sdk/traceloop/sdk/instruments.py
🧬 Code graph analysis (1)
packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py (3)
packages/traceloop-sdk/traceloop/sdk/instruments.py (1)
  • Instruments (4-40)
packages/opentelemetry-instrumentation-google-generativeai/opentelemetry/instrumentation/google_generativeai/utils.py (1)
  • is_package_installed (74-75)
packages/traceloop-sdk/traceloop/sdk/utils/package_check.py (1)
  • is_package_installed (14-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Lint
  • GitHub Check: Build Packages (3.11)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Test Packages (3.10)
🔇 Additional comments (3)
packages/traceloop-sdk/traceloop/sdk/instruments.py (1)

13-13: LGTM! Enum addition follows conventions.

The new GOOGLE_ADK enum member is correctly added and follows the naming convention. The alphabetical placement is appropriate.

packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py (2)

709-713: LGTM! Package check correctly expanded to include google-adk.

The package availability check now includes google-adk alongside the existing google-generativeai and google-genai checks. The logic correctly activates the instrumentor when any of the three related packages are installed.


496-499: Verify google-adk compatibility with GoogleGenerativeAiInstrumentor before merging.

The code groups GOOGLE_ADK with GOOGLE_GENERATIVEAI to use the same instrumentor. Confirm that GoogleGenerativeAiInstrumentor supports google-adk's API patterns and that GOOGLE_ADK is properly defined in the Instruments enum.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 3f6b79f in 1 minute and 33 seconds. Click for details.
  • Reviewed 41 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/traceloop/sdk/instruments.py:13
  • Draft comment:
    Added enum value 'GOOGLE_ADK'. Ensure its naming/documentation aligns with the package (google-adk).
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py:496
  • Draft comment:
    Updated instrumentation check to include GOOGLE_ADK. Logic is clear and correctly combines both supported enum values.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it only states that the logic is clear and correctly combines supported enum values. It doesn't provide any actionable feedback or suggestions for improvement.
3. packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py:707
  • Draft comment:
    Extended package check to include 'google-adk'. Note: the error log still mentions 'Gemini instrumentor' which seems like a copy-paste error. Consider updating it.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_CsXW26SsbM7VP6XX

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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.

1 participant