Skip to content

feat: Remove early return for NoOpStreamedSpan in set_transaction_name - #7164

Open
alexander-alderman-webb wants to merge 2 commits into
webb/set-transaction-on-scopefrom
webb/remove-set-transaction-name-early-return
Open

feat: Remove early return for NoOpStreamedSpan in set_transaction_name#7164
alexander-alderman-webb wants to merge 2 commits into
webb/set-transaction-on-scopefrom
webb/remove-set-transaction-name-early-return

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

The follow-up PR fails with this otherwise

_ test_catch_exceptions[True-/some_url-ZeroDivisionError-division by zero-tests.integrations.litestar.test_litestar.litestar_app_factory.<locals>.homepage_handler] _
tests/integrations/litestar/test_litestar.py:139: in test_catch_exceptions
    assert expected_tx_name in event["transaction"]
E   AssertionError: assert 'tests.integrations.litestar.test_litestar.litestar_app_factory.<locals>.homepage_handler' in 'http://testserver.local/some_url'

because the ASGI integration sees that the segment source is not set when the span is not sampled.

Issues

Reminders

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

102732 passed | ❌ 1 failed | ⏭️ 6677 skipped | Total: 109410 | Pass Rate: 93.9% | Execution Time: 361m 36s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -1251
Passed Tests 📉 -1252
Failed Tests 📈 +1
Skipped Tests

➕ New Tests (1)

View new tests
  • test_binary_content_encoding_image_url[True-False]
    • File: tests.integrations.litellm.test_litellm
    • Status: ❌ Failing

❌ Failed Tests

test_binary_content_encoding_image_url[True-False]

File: tests.integrations.litellm.test_litellm
Suite: py3.10-litellm-v1.89.7
Error: pytest.PytestUnraisableExceptionWarning: Exception ignored in thread started by: <bound method Thread._bootstrap of <Thread(Thread-65 (_flush_loop), started daemon 139737532044864)>> Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

Stack Trace
/usr/lib/python3.10/threading.py:973: in _bootstrap
    self._bootstrap_inner()
/usr/lib/python3.10/threading.py:1011: in _bootstrap_inner
    _sys.settrace(_trace_hook)
E   RuntimeError: Cannot install a trace function while another trace function is being installed

The above exception was the direct cause of the following exception:
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/runner.py:361: in from_call
    result: TResult | None = func()
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/runner.py:250: in <lambda>
    lambda: runtest_hook(item=item, **kwds),
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/pluggy/_hooks.py:512: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/logging.py:865: in pytest_runtest_call
    yield
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/pluggy/_callers.py:53: in run_old_style_hookwrapper
    return result.get_result()
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/pluggy/_callers.py:38: in run_old_style_hookwrapper
    res = yield
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/capture.py:900: in pytest_runtest_call
    return (yield)
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/skipping.py:268: in pytest_runtest_call
    return (yield)
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/unraisableexception.py:183: in pytest_runtest_call
    collect_unraisable(item.config)
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable
    raise errors[0]
.tox/py3.10-litellm-v1.89.7/lib/python3.10/site-packages/_pytest/unraisableexception.py:67: in collect_unraisable
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E   pytest.PytestUnraisableExceptionWarning: Exception ignored in thread started by: <bound method Thread._bootstrap of <Thread(Thread-65 (_flush_loop), started daemon 139737532044864)>>
E   Enable tracemalloc to get traceback where the object was allocated.
E   See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.15%    90.15%        —%
==========================================
  Files          193       193         —
  Lines        25147     25151        +4
  Branches      9136      9138        +2
==========================================
+ Hits         22669     22673        +4
- Misses        2478      2478         —
- Partials      1431      1432        +1

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review August 11, 2026 11:12
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner August 11, 2026 11:12
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.

3 participants