Skip to content

Add HTTP result code to USDT milestone_sm_finish#12937

Open
moonchen wants to merge 1 commit intoapache:masterfrom
moonchen:usdt-add-http-result-code
Open

Add HTTP result code to USDT milestone_sm_finish#12937
moonchen wants to merge 1 commit intoapache:masterfrom
moonchen:usdt-add-http-result-code

Conversation

@moonchen
Copy link
Contributor

@moonchen moonchen commented Mar 4, 2026

No description provided.

@moonchen moonchen added this to the 10.2.0 milestone Mar 4, 2026
@moonchen moonchen requested a review from Copilot March 4, 2026 18:10
@moonchen moonchen self-assigned this Mar 4, 2026

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

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));
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

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);

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

@moonchen
Copy link
Contributor Author

moonchen commented Mar 4, 2026

[approve ci autest 0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants