Skip to content

fix(axiom): all force_current_segment references should only apply to PHPs < 8.0#1211

Merged
zsistla merged 3 commits into
feat/fibersfrom
fibers/handle_force_current_segment
May 1, 2026
Merged

fix(axiom): all force_current_segment references should only apply to PHPs < 8.0#1211
zsistla merged 3 commits into
feat/fibersfrom
fibers/handle_force_current_segment

Conversation

@zsistla

@zsistla zsistla commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Most of references to force_current_segment or nr_txn_force_current segment were placed in if/endif blocks with the OAPI effort. The change was never explicitly mentioned and there's a chance it could be used in a breaking manner. All remaining references in axiom specify explicitly it is not to be used with oapi. Axiom doesn't understand ZEND_API numbers so it can't be placed in if/endif blocks.

… < 8 #ifs

Most of references to force_current_segment or nr_txn_force_current segment
were placed in if/endif blocks with the OAPI effort.  The change was never
explicitly mentioned and there's a chance it could be used in a breaking manner.
All remaining references were placed in if/endif blocks that only allow for
PHPs less than 8.0
@zsistla zsistla added this to the fiber milestone Apr 29, 2026
@newrelic-php-agent-bot

newrelic-php-agent-bot commented Apr 29, 2026

Copy link
Copy Markdown
Test Suite Status Result
Multiverse 12/18 passing
SOAK 135/135 passing

Comment thread axiom/nr_txn.c
if (nr_txn_should_create_span_events(txn)) {
span_id = nr_txn_get_current_span_id(
txn, nr_string_get(txn->trace_strings, txn->current_async_context));
span_id = nr_txn_get_current_span_id(txn, nr_txn_get_current_context(txn));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ignore this, it is part of #1210.

Comment thread axiom/nr_txn.c

if (add_to_current_segment) {
current_segment = nr_txn_get_current_segment(txn, NULL);
current_segment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not part of this PR, it's part of #1210.

Comment thread axiom/nr_txn.c

if (nr_txn_should_create_span_events(txn)) {
current = nr_txn_get_current_segment(txn, NULL);
current = nr_txn_get_current_segment(txn, nr_txn_get_current_context(txn));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not part of this PR, it's part of #1210.

@codecov-commenter

codecov-commenter commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.94%. Comparing base (44a9ba8) to head (7131217).

Additional details and impacted files
@@               Coverage Diff               @@
##           feat/fibers    #1211      +/-   ##
===============================================
- Coverage        79.94%   79.94%   -0.01%     
===============================================
  Files              189      189              
  Lines            27824    27823       -1     
===============================================
- Hits             22243    22242       -1     
  Misses            5581     5581              
Flag Coverage Δ
agent-for-php-7.2 79.98% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.3 80.00% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.4 79.87% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.0 79.44% <100.00%> (-0.01%) ⬇️
agent-for-php-8.1 79.54% <100.00%> (-0.01%) ⬇️
agent-for-php-8.2 79.15% <100.00%> (-0.01%) ⬇️
agent-for-php-8.3 79.23% <100.00%> (-0.01%) ⬇️
agent-for-php-8.4 79.24% <100.00%> (-0.01%) ⬇️
agent-for-php-8.5 78.56% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zsistla zsistla merged commit aa966f8 into feat/fibers May 1, 2026
71 checks passed
@zsistla zsistla deleted the fibers/handle_force_current_segment branch May 1, 2026 16:48
@zsistla zsistla added the fibers label Jun 8, 2026
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.

4 participants