Add http.connection.protocol_error_code
to connection duration metric
#1135
Labels
http.connection.protocol_error_code
to connection duration metric
#1135
Area(s)
No response
Is your change request related to a problem? Please describe.
HTTP/2 and HTTP/3 define protocol error codes that are used when ending a HTTP connection.
These codes are often - but not always - sent over the wire when a HTTP connection is ending gracefully or with an error. They can have useful information that explains why a connection was closed. They're basically the connection version of HTTP status code.
Describe the solution you'd like
Add a tag to client/server HTTP connection duration metrics that has this value.
Value would be an unsigned integer. HTTP/2 value can be up to 32 bits and HTTP/3 value can be up to 64 bits. To support both values, the tag definition should say its value in an unsigned 64 bit integer.
Although HTTP/2 and HTTP/3 have predefined values for the code, I think it should be a number like the HTTP status code. In it's possible to send an error code that isn't predefined, although it's not recommended.
The tags is omitted if the value is NO_ERROR (http/2) or H3_NO_ERROR (http/3)
Describe alternatives you've considered
The value could be put in
error.type
. I prefer having a different tag value because the server or client might want to supply the internal error reason in theerror.type
field, while it is still useful to know the protocol error code value that was sent to the peer.Additional context
No response
The text was updated successfully, but these errors were encountered: