[usdt] http_attach_client_session: add args#13041
Merged
moonchen merged 1 commit intoapache:masterfrom Mar 31, 2026
Merged
Conversation
Add the following USDT arguments to http_attach_client_session: transaction id, netVC id.
bneradt
approved these changes
Mar 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds additional USDT (SystemTap) probe arguments to improve observability when a client session is attached in the HTTP state machine.
Changes:
- Extend
http_attach_client_sessionprobe from 2 to 4 arguments. - Include transaction id and
UnixNetVConnectionid (when available) in the probe payload.
Comment on lines
+426
to
+427
| ATS_PROBE4(http_attach_client_session, sm_id, netvc->get_socket(), txn->get_transaction_id(), | ||
| dynamic_cast<UnixNetVConnection *>(netvc) ? dynamic_cast<UnixNetVConnection *>(netvc)->id : 0); |
There was a problem hiding this comment.
The 4th probe argument repeats the same dynamic_cast twice, which is unnecessary work (when probes are enabled) and makes the probe call harder to read. Consider storing the cast result in a local UnixNetVConnection * (or auto *) and passing unix_vc ? unix_vc->id : 0 as the last argument.
Suggested change
| ATS_PROBE4(http_attach_client_session, sm_id, netvc->get_socket(), txn->get_transaction_id(), | |
| dynamic_cast<UnixNetVConnection *>(netvc) ? dynamic_cast<UnixNetVConnection *>(netvc)->id : 0); | |
| auto *unix_vc = dynamic_cast<UnixNetVConnection *>(netvc); | |
| ATS_PROBE4(http_attach_client_session, sm_id, netvc->get_socket(), txn->get_transaction_id(), | |
| unix_vc ? unix_vc->id : 0); |
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.
Add the following USDT arguments to http_attach_client_session: transaction id, netVC id.