fix(axiom): all force_current_segment references should only apply to PHPs < 8.0#1211
Merged
Merged
Conversation
… < 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
commented
Apr 30, 2026
| 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)); |
zsistla
commented
Apr 30, 2026
|
|
||
| if (add_to_current_segment) { | ||
| current_segment = nr_txn_get_current_segment(txn, NULL); | ||
| current_segment |
Contributor
Author
There was a problem hiding this comment.
Not part of this PR, it's part of #1210.
zsistla
commented
Apr 30, 2026
|
|
||
| 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)); |
Contributor
Author
There was a problem hiding this comment.
Not part of this PR, it's part of #1210.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bduranleau-nr
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.