You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @nirga. Could you specify which components or packages within the project interact directly with foundation model APIs? This information will help narrow down the search to the relevant parts of the codebase.
Also, could you provide insight into how a 'failed span' is defined or identified within the context of the project? This will aid in accurately logging the relevant events as failed spans.
Hi @nirga ,
This issue is still open and I would like to help. I see that PRs for openai and langchain have already been merged.
I can take on one of the remaining packages. Would it be helpful if I started with opentelemetry-instrumentation-cohere (or pick another one from the list)?
Please let me know!
Hi @nirga ,
I've finished the changes locally to fix the error logging for the cohere package. I've added try...except...finally blocks to the streaming functions and fixed the async wrapper. I also added new unit tests for the error paths, and all tests for the package are passing.
Since this PR only fixes the issue for cohere (and the original issue #412 covers multiple packages), should I open the Pull Request linked to #412, or would you prefer I create a new, separate issue specifically for the cohere fix and link the PR to that?
Activity
HappyLife2 commentedon Feb 25, 2024
Hi @nirga. Could you specify which components or packages within the project interact directly with foundation model APIs? This information will help narrow down the search to the relevant parts of the codebase.
Also, could you provide insight into how a 'failed span' is defined or identified within the context of the project? This will aid in accurately logging the relevant events as failed spans.
nirga commentedon Feb 26, 2024
Hey @HappyLife2!
These are
opentelemetry-instrumentatin-openai,-anthropic,-cohere,-replicate,-bedrock,-vertexaiand-transformers.This is how a failed span should be logged: https://opentelemetry.io/docs/languages/python/instrumentation/#record-exceptions-in-spans
epg323 commentedon May 2, 2024
I can be assigned to this one if no one wants it.
nirga commentedon May 2, 2024
That would be great @epg323 :)
I assume @HappyLife2 is not actively working on this since it's been 2 months.
akhilk2802 commentedon Jul 3, 2024
Is the issue still open ?
nirga commentedon Jul 3, 2024
Yes @akhilk2802! Appreciate any help :)
akhilk2802 commentedon Jul 6, 2024
okay, looking into it
Huzaifa666 commentedon Jul 20, 2024
Is this issue still open or resolved ?
nirga commentedon Jul 20, 2024
Yes this is still open, not sure what's the status of @akhilk2802 though
Huzaifa666 commentedon Jul 20, 2024
Hey @nirga
I was able to setup a sample project and can see the spans in my dashboard

I produced a 401 error code by inputting incorrect API_KEY
You want this error to be logged as a span
Correct me if I am wrong here
nirga commentedon Jul 20, 2024
Exactly @Huzaifa666!
Huzaifa666 commentedon Jul 20, 2024
Is this acceptable ?
Was able to show the error in the logged span
@nirga
nirga commentedon Jul 20, 2024
Looks good, let's look at the code
4 remaining items
nirga commentedon Jan 20, 2025
@jareks any specific pacakges / instrumentation you'd like us to prioritize?
jareks commentedon Jan 20, 2025
Exceptions from openai client would be great 👍
apthaks commentedon Feb 11, 2025
Any update on langchain?
nirga commentedon Feb 19, 2025
@apthagowda97 we're adding this now! Sorry for the delay here
shristirwt commentedon Oct 21, 2025
Hi @nirga ,
This issue is still open and I would like to help. I see that PRs for openai and langchain have already been merged.
I can take on one of the remaining packages. Would it be helpful if I started with opentelemetry-instrumentation-cohere (or pick another one from the list)?
Please let me know!
nirga commentedon Oct 21, 2025
Yes that would be perfect @shristirwt
shristirwt commentedon Oct 27, 2025
Hi @nirga ,
I've finished the changes locally to fix the error logging for the cohere package. I've added try...except...finally blocks to the streaming functions and fixed the async wrapper. I also added new unit tests for the error paths, and all tests for the package are passing.
Since this PR only fixes the issue for cohere (and the original issue #412 covers multiple packages), should I open the Pull Request linked to #412, or would you prefer I create a new, separate issue specifically for the cohere fix and link the PR to that?
Let me know!
nirga commentedon Oct 29, 2025
Small PRs are always better :) @shristirwt
DDiyash commentedon Dec 24, 2025
Hey @nirga, I see that the issue is still open, I’d like to take on opentelemetry-instrumentation-anthropic. Could you assign this issue to me?
srijansingh9170-source commentedon Mar 31, 2026
Hi, I would like to work on this issue. Could you please assign it to me?
fix: record errors on spans for anthropic, groq, and mistralai instru…
fix(ollama,together,replicate,sagemaker,bedrock): record exceptions o…
fix(chromadb,pinecone,weaviate,lancedb,milvus): record exceptions on …
fix(replicate): record errors on spans