From 4fc6aa432609895e81a07d35c864a91ae3bdf7e2 Mon Sep 17 00:00:00 2001 From: Sam Xie Date: Mon, 6 Jul 2020 15:34:51 +0800 Subject: [PATCH] Add http content size to standard package Signed-off-by: Sam Xie --- api/standard/trace.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/standard/trace.go b/api/standard/trace.go index 850b5dd4c2ae..c59f5ba5fa9a 100644 --- a/api/standard/trace.go +++ b/api/standard/trace.go @@ -111,6 +111,20 @@ const ( // The IP address of the original client behind all proxies, if known // (e.g. from X-Forwarded-For). HTTPClientIPKey = kv.Key("http.client_ip") + + // The size of the request payload body in bytes. + HTTPRequestContentLength = kv.Key("http.request_content_length") + + // The size of the uncompressed request payload body after transport decoding. + // Not set if transport encoding not used. + HTTPRequestContentLengthUncompressed = kv.Key("http.request_content_length_uncompressed") + + // The size of the response payload body in bytes. + HTTPResponseContentLength = kv.Key("http.response_content_length") + + // The size of the uncompressed response payload body after transport decoding. + // Not set if transport encoding not used. + HTTPResponseContentLengthUncompressed = kv.Key("http.response_content_length_uncompressed") ) var (