Skip to content
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: Errors are not logged #412

Open
1 task done
nirga opened this issue Feb 8, 2024 · 16 comments · May be fixed by #1619
Open
1 task done

🐛 Bug Report: Errors are not logged #412

nirga opened this issue Feb 8, 2024 · 16 comments · May be fixed by #1619
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nirga
Copy link
Member

nirga commented Feb 8, 2024

Which component is this bug for?

All Packages

📜 Description

If an HTTP error is returned from a foundation model API, we don't properly log it as a failed span.

👟 Reproduction steps

N/A

👍 Expected behavior

N/A

👎 Actual Behavior with Screenshots

N/A

🤖 Python Version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

@nirga nirga added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 8, 2024
@HappyLife2
Copy link

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
Copy link
Member Author

nirga commented Feb 26, 2024

Hey @HappyLife2!
These are opentelemetry-instrumentatin-openai, -anthropic, -cohere, -replicate, -bedrock, -vertexai and -transformers.

This is how a failed span should be logged: https://opentelemetry.io/docs/languages/python/instrumentation/#record-exceptions-in-spans

@epg323
Copy link

epg323 commented May 2, 2024

I can be assigned to this one if no one wants it.

@nirga
Copy link
Member Author

nirga commented May 2, 2024

That would be great @epg323 :)
I assume @HappyLife2 is not actively working on this since it's been 2 months.

@akhilk2802
Copy link

Is the issue still open ?

@nirga
Copy link
Member Author

nirga commented Jul 3, 2024

Yes @akhilk2802! Appreciate any help :)

@akhilk2802
Copy link

okay, looking into it

@Huzaifa666
Copy link

Is this issue still open or resolved ?

@nirga
Copy link
Member Author

nirga commented Jul 20, 2024

Yes this is still open, not sure what's the status of @akhilk2802 though

@Huzaifa666
Copy link

Hey @nirga

I was able to setup a sample project and can see the spans in my dashboard
Screenshot from 2024-07-20 23-20-42

I produced a 401 error code by inputting incorrect API_KEY

Screenshot from 2024-07-20 23-23-54

You want this error to be logged as a span
Correct me if I am wrong here

@nirga
Copy link
Member Author

nirga commented Jul 20, 2024

Exactly @Huzaifa666!

@Huzaifa666
Copy link

Huzaifa666 commented Jul 20, 2024

Screenshot from 2024-07-20 23-51-53

Is this acceptable ?
Was able to show the error in the logged span
@nirga

@nirga
Copy link
Member Author

nirga commented Jul 20, 2024

Looks good, let's look at the code

@Huzaifa666 Huzaifa666 linked a pull request Jul 20, 2024 that will close this issue
4 tasks
@Huzaifa666
Copy link

Have linked the PR with the issue
Shared in the slack channel as well

@Bommy32
Copy link

Bommy32 commented Aug 29, 2024

Is this still open by chance? I'd love to give it a go.

If it is, I would like to clarify please: Is it for all packages everywhere or just all packages for the ones referenced earlier? opentelemetry-instrumentatin-openai, -anthropic, -cohere, -replicate, -bedrock, -vertexai and -transformers

@nirga
Copy link
Member Author

nirga commented Aug 29, 2024

@Bommy32 yes it's still open :)
It's for all packages, except for the SDK and the sample app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants