Skip to content

fix(tracing): Set sentry.op to function in new trace decorator#6796

Open
sentrivana wants to merge 2 commits into
masterfrom
ivana/set-op-to-function-in-trace-deco
Open

fix(tracing): Set sentry.op to function in new trace decorator#6796
sentrivana wants to merge 2 commits into
masterfrom
ivana/set-op-to-function-in-trace-deco

Conversation

@sentrivana

@sentrivana sentrivana commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

We weren't setting sentry.op in spans created with the @sentry_sdk.traces.trace decorator, so they'd show up with a fallback name in the product.

Issues

Closes #6795

Reminders

@sentrivana sentrivana changed the title fix(tracing): Set sentry.op to function in new trace decorator fix(tracing): Set sentry.op to function in new trace decorator Jul 10, 2026
@sentrivana sentrivana marked this pull request as ready for review July 10, 2026 12:42
@sentrivana sentrivana requested a review from a team as a code owner July 10, 2026 12:42
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

91020 passed | ⏭️ 6302 skipped | Total: 97322 | Pass Rate: 93.52% | Execution Time: 315m 54s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2439 uncovered lines.
✅ Project coverage is 89.79%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/tracing_utils.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.76%    89.79%    +0.03%
==========================================
  Files          193       193         —
  Lines        23888     23891        +3
  Branches      8250      8252        +2
==========================================
+ Hits         21442     21452       +10
- Misses        2446      2439        -7
- Partials      1353      1354        +1

Generated by Codecov Action

Comment thread sentry_sdk/tracing_utils.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7e5f771. Configure here.

Comment thread sentry_sdk/tracing_utils.py
Copy attributes dict instead of using `or` to prevent rebinding the
closure variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Set correct op for @sentry_sdk.traces.trace

3 participants