Skip to content

Commit 734ac56

Browse files
authored
Merge pull request #2231 from toru/h3-probe-instrumentation
Instrument H3 code path with req-level dtrace probes
2 parents b998922 + 1313a3e commit 734ac56

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/http3/server.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ static int handle_input_expect_headers(struct st_h2o_http3_server_stream_t *stre
966966
if (ret == H2O_HTTP2_ERROR_INVALID_HEADER_CHAR) {
967967
if (!quicly_recvstate_transfer_complete(&stream->quic->recvstate))
968968
quicly_request_stop(stream->quic, H2O_HTTP3_ERROR_EARLY_RESPONSE);
969+
h2o_probe_log_request(&stream->req, stream->quic->stream_id);
969970
h2o_send_error_400(&stream->req, "Invalid Request", *err_desc, 0);
970971
*err_desc = NULL;
971972
return 0;
@@ -974,6 +975,8 @@ static int handle_input_expect_headers(struct st_h2o_http3_server_stream_t *stre
974975
if (header_ack_len != 0)
975976
h2o_http3_send_qpack_header_ack(&conn->h3, header_ack, header_ack_len);
976977

978+
h2o_probe_log_request(&stream->req, stream->quic->stream_id);
979+
977980
/* check if content-length is within the permitted bounds */
978981
if (stream->req.content_length != SIZE_MAX &&
979982
stream->req.content_length > conn->super.ctx->globalconf->max_request_entity_size) {
@@ -1016,6 +1019,7 @@ static void do_send(h2o_ostream_t *_ostr, h2o_req_t *_req, h2o_sendvec_t *bufs,
10161019

10171020
if (stream->state == H2O_HTTP3_SERVER_STREAM_STATE_SEND_HEADERS) {
10181021
write_response(stream);
1022+
h2o_probe_log_response(&stream->req, stream->quic->stream_id);
10191023
set_state(stream, H2O_HTTP3_SERVER_STREAM_STATE_SEND_BODY);
10201024
} else {
10211025
assert(stream->state == H2O_HTTP3_SERVER_STREAM_STATE_SEND_BODY);

0 commit comments

Comments
 (0)