Skip to content

Update openai spans to be OTel compatible #4563

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

Open
wants to merge 2 commits into
base: antonpirker/openai-overhaul
Choose a base branch
from

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Jul 9, 2025

Change the spans name, op, and attributes to the new OTel compatible names.

We checked and none of our customers use those legacy span names, span ops, or attribute names in alerts, dashboards, or saved queries so this is save to change in a minor.

@antonpirker antonpirker requested a review from a team as a code owner July 9, 2025 11:57
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.67%. Comparing base (a7b2d67) to head (5dc8107).

❌ Unsupported file format

Upload processing failed due to unsupported file format. Please review the parser error message:
Error parsing JUnit XML in /home/runner/work/sentry-python/sentry-python/.junitxml at 1:1648

Caused by:
RuntimeError: Error parsing XML

Caused by:
    0: ill-formed document: close tag `</testsuite>` does not match any open tag
    1: close tag `&lt;/testsuite&gt;` does not match any open tag</code></pre>

For more help, visit our troubleshooting guide.

Files with missing lines Patch % Lines
sentry_sdk/integrations/openai.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           antonpirker/openai-overhaul    #4563      +/-   ##
===============================================================
- Coverage                        80.68%   80.67%   -0.02%     
===============================================================
  Files                              156      156              
  Lines                            16482    16484       +2     
  Branches                          2802     2802              
===============================================================
- Hits                             13299    13298       -1     
- Misses                            2299     2300       +1     
- Partials                           884      886       +2     
Files with missing lines Coverage Δ
sentry_sdk/consts.py 94.64% <100.00%> (+0.01%) ⬆️
sentry_sdk/integrations/openai.py 80.22% <83.33%> (+0.07%) ⬆️

... and 1 file with indirect coverage changes

@antonpirker antonpirker changed the title Updated attribute names to be OTel compatible Update openai spans to be OTel compatible Jul 9, 2025
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.

2 participants