Skip to content

Conversation

@nirga
Copy link
Member

@nirga nirga commented Nov 25, 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.

Important

Fixes package name typo in init_watsonx_instrumentor() in tracing.py to ensure correct Watsonx instrumentor initialization.

  • Behavior:
    • Fixes package name typo in init_watsonx_instrumentor() in tracing.py from "ibm_watson_machine_learning" to "ibm-watson-machine-learning".
    • Ensures correct package detection for Watsonx instrumentor initialization.

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

Summary by CodeRabbit

  • Bug Fixes
    • Fixed WatsonX instrumentation to correctly detect the required machine learning package dependency, ensuring proper initialization when the package is installed.

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

A package name check in WatsonX instrumentor initialization is updated from underscore-separated format (ibm_watson_machine_learning) to hyphen-separated format (ibm-watson-machine-learning) to correctly detect the installed package name.

Changes

Cohort / File(s) Summary
Package detection logic
packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py
Updated package name check from "ibm_watson_machine_learning" to "ibm-watson-machine-learning" in init_watsonx_instrumentor function

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-line change to a package name string
  • No logic alterations or control flow modifications
  • Straightforward hyphen vs. underscore correction

Poem

🐰 A hyphen here, an underscore there,
One tiny fix with thoughtful care—
Watson's instrumentation gleams,
With package names that match our dreams! ✨

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 clearly and specifically identifies the main change: fixing a WatsonX warning on initialization by correcting the package name check from underscore to hyphen format.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-watsonx-warning

📜 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 f9a586a and ca4ca43.

📒 Files selected for processing (1)
  • packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py (1 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
⏰ 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: Test Packages (3.10)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Lint
  • GitHub Check: Build Packages (3.11)
🔇 Additional comments (1)
packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py (1)

904-908: Watsonx package name check fix looks correct; consider clarifying dual-name handling

The switch to "ibm-watson-machine-learning" aligns with the canonical PyPI distribution name and should resolve the false “not installed” path for Watsonx when that package is present. This is consistent with how other instrumentors here key off distribution names.

If is_package_installed does not already normalize hyphen/underscore (as suggested by the explicit dual checks for Qdrant and LlamaIndex), you might optionally support both variants for completeness, e.g. also accepting "ibm_watson_machine_learning". Not required for this bugfix, but worth confirming against is_package_installed’s behavior and adding/adjusting tests for init_watsonx_instrumentor accordingly.


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 ca4ca43 in 30 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 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/tracing/tracing.py:907
  • Draft comment:
    Updated package name to 'ibm-watson-machine-learning' for correct detection. Looks good.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, stating that a package name was updated for correct detection. It does not provide a suggestion, ask for confirmation of intention, or point out a potential issue. It violates the rule against making purely informative comments.

Workflow ID: wflow_6ZkVkXwbApVfkq1Z

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

@nirga nirga merged commit 1ca74fe into main Nov 25, 2025
12 checks passed
@nirga nirga deleted the fix-watsonx-warning branch November 25, 2025 10:08
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.

3 participants