-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug Report: Watsonx hardcoded values #2163
Comments
Hey @gauthiersiri 👋, I'm here to help you with any bug reports, questions, or contributions. Let me know how I can assist you! The issue you're experiencing with hardcoded values in Watsonx Instrumentation, specifically the API base URL, can be resolved by modifying the To fix this, you can update the def _set_api_attributes(span):
api_base_url = os.getenv("WATSONX_API_BASE_URL", "https://us-south.ml.cloud.ibm.com")
_set_span_attribute(
span,
WatsonxSpanAttributes.WATSONX_API_BASE,
api_base_url,
)
_set_span_attribute(span, WatsonxSpanAttributes.WATSONX_API_TYPE, "watsonx.ai")
_set_span_attribute(span, WatsonxSpanAttributes.WATSONX_API_VERSION, "1.0")
return By using the |
@gyliu513 fyi |
Thanks @nirga @gauthiersiri , that is in our backlog, will fix it soon! |
@gauthiersiri if you work for IBM, please reach out to me via our internal slack as well, happy to be connected and we can discuss more for your use cases and some requirements etc. and then collaborate in openLLMetry and OTEL community to move forward, thanks! |
Is this issue up to grab? |
@rajmanna-dev Yes, as IBM Watsonx AI Platform also support on-prem as well, so with on-prem, the API BASE URL may changed. |
Can I take this issue? |
Yes :) @rajmanna-dev |
Can you please assign me? @nirga |
@rajmanna-dev just a fix proposal here, as the URL was mainly used as a span attribute, so we can probably let customer set a env var before they run their apps, and then we can update the code to use |
@gyliu513 you can't just get it from the client sdk? |
@nirga No, from https://github.com/traceloop/openllmetry/blob/main/packages/sample-app/sample_app/watsonx-langchain.py#L31 , you can see this is configured by customer when they are trying to build the model for watsonx platform. |
Ah great so we can get it from there! |
|
@rajmanna-dev that's ok - these are samples |
Which component is this bug for?
Watsonx Instrumentation
📜 Description
Some variables, showing in traceloop traces, are hardcoded.
For example, even if hitting watsonx in frankfurt, it shows that it's using https://us-south.ml.cloud.ibm.com, which is incorrect.
👟 Reproduction steps
Create a python script using watsonx in frankfurt for example, and see that in the traces it shows https://us-south.ml.cloud.ibm.com, as hardcoded in packages/opentelemetry-instrumentation-watsonx/opentelemetry/instrumentation/watsonx/init.py line 103
👍 Expected behavior
It should show the real parameter istead of harcoded ones.
👎 Actual Behavior with Screenshots
🤖 Python Version
3.12
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: