Add HTTP result code to USDT milestone_sm_finish#12937
Open
moonchen wants to merge 1 commit intoapache:masterfrom
Open
Add HTTP result code to USDT milestone_sm_finish#12937moonchen wants to merge 1 commit intoapache:masterfrom
moonchen wants to merge 1 commit intoapache:masterfrom
Conversation
9fe7b74 to
e826125
Compare
| const HTTPStatus status_code = | ||
| t_state.hdr_info.client_response.valid() ? t_state.hdr_info.client_response.status_get() : HTTPStatus::NONE; | ||
|
|
||
| ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code)); |
There was a problem hiding this comment.
Changing milestone_sm_finish from ATS_PROBE1 to ATS_PROBE2 is a USDT interface change: existing bpftrace/perf scripts that assume only arg0 (sm_id) will now see an additional arg1 (HTTP status). The repo documentation example still treats milestone_sm_finish as having a single argument (doc/developer-guide/debugging/tracing.en.rst around the bpftrace example), so it should be updated to reflect the new signature and describe arg1.
Suggested change
| ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code)); | |
| ATS_PROBE1(milestone_sm_finish, sm_id); |
Contributor
Author
There was a problem hiding this comment.
The example demonstrates the use of sm_id. It doesn't need to use status_code, and the bpftrace code should keep working as is.
Contributor
Author
|
[approve ci autest 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.
No description provided.