Skip to content

fix(cohere): stop setting transaction status on AI span errors#5863

Closed
NIK-TIGER-BILL wants to merge 1 commit intogetsentry:masterfrom
NIK-TIGER-BILL:fix/cohere-stop-setting-transaction-status
Closed

fix(cohere): stop setting transaction status on AI span errors#5863
NIK-TIGER-BILL wants to merge 1 commit intogetsentry:masterfrom
NIK-TIGER-BILL:fix/cohere-stop-setting-transaction-status

Conversation

@NIK-TIGER-BILL
Copy link

Description

AI integrations should not interfere with HTTP transactions.

_capture_exception() called set_span_errored() (no span argument) which sets the current span AND the containing transaction to INTERNAL_ERROR. Replace with get_current_span() + direct span.set_status() that only affects the AI span.

Changed files:

  • sentry_sdk/integrations/cohere.py
  • tests/integrations/cohere/test_cohere.py

Issues

AI integrations should not interfere with HTTP transactions.
Replace set_span_errored() with direct span.set_status() to avoid
propagating INTERNAL_ERROR to the containing HTTP transaction.

Fixes getsentry#5792

Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cohere: Stop setting transaction status

2 participants