| Index: client/third_party/infra_libs/ts_mon/common/http_metrics.py
|
| diff --git a/client/third_party/infra_libs/ts_mon/common/http_metrics.py b/client/third_party/infra_libs/ts_mon/common/http_metrics.py
|
| index 0df4faca68f8d592f23c0a964f7378e5f9f88417..35204682f9a16768063a8334bd81178b5533f82b 100644
|
| --- a/client/third_party/infra_libs/ts_mon/common/http_metrics.py
|
| +++ b/client/third_party/infra_libs/ts_mon/common/http_metrics.py
|
| @@ -11,29 +11,57 @@ STATUS_ERROR = 901
|
| STATUS_TIMEOUT = 902
|
| STATUS_EXCEPTION = 909
|
|
|
| -
|
| request_bytes = metrics.CumulativeDistributionMetric('http/request_bytes',
|
| - description='Bytes sent per http request (body only).')
|
| + 'Bytes sent per http request (body only).', [
|
| + metrics.StringField('name'),
|
| + metrics.StringField('client'),
|
| + ])
|
| response_bytes = metrics.CumulativeDistributionMetric('http/response_bytes',
|
| - description='Bytes received per http request (content only).')
|
| + 'Bytes received per http request (content only).', [
|
| + metrics.StringField('name'),
|
| + metrics.StringField('client'),
|
| + ])
|
| durations = metrics.CumulativeDistributionMetric('http/durations',
|
| - description='Time elapsed between sending a request and getting a'
|
| - ' response (including parsing) in milliseconds.')
|
| + 'Time elapsed between sending a request and getting a'
|
| + ' response (including parsing) in milliseconds.', [
|
| + metrics.StringField('name'),
|
| + metrics.StringField('client'),
|
| + ])
|
| response_status = metrics.CounterMetric('http/response_status',
|
| - description='Number of responses received by HTTP status code.')
|
| + 'Number of responses received by HTTP status code.', [
|
| + metrics.IntegerField('status'),
|
| + metrics.StringField('name'),
|
| + metrics.StringField('client'),
|
| + ])
|
|
|
|
|
| server_request_bytes = metrics.CumulativeDistributionMetric(
|
| 'http/server_request_bytes',
|
| - description='Bytes received per http request (body only).')
|
| + 'Bytes received per http request (body only).', [
|
| + metrics.IntegerField('status'),
|
| + metrics.StringField('name'),
|
| + metrics.BooleanField('is_robot'),
|
| + ])
|
| server_response_bytes = metrics.CumulativeDistributionMetric(
|
| 'http/server_response_bytes',
|
| - description='Bytes sent per http request (content only).')
|
| + 'Bytes sent per http request (content only).', [
|
| + metrics.IntegerField('status'),
|
| + metrics.StringField('name'),
|
| + metrics.BooleanField('is_robot'),
|
| + ])
|
| server_durations = metrics.CumulativeDistributionMetric('http/server_durations',
|
| - description='Time elapsed between receiving a request and sending a'
|
| - ' response (including parsing) in milliseconds.')
|
| + 'Time elapsed between receiving a request and sending a'
|
| + ' response (including parsing) in milliseconds.', [
|
| + metrics.IntegerField('status'),
|
| + metrics.StringField('name'),
|
| + metrics.BooleanField('is_robot'),
|
| + ])
|
| server_response_status = metrics.CounterMetric('http/server_response_status',
|
| - description='Number of responses sent by HTTP status code.')
|
| + 'Number of responses sent by HTTP status code.', [
|
| + metrics.IntegerField('status'),
|
| + metrics.StringField('name'),
|
| + metrics.BooleanField('is_robot'),
|
| + ])
|
|
|
|
|
| def update_http_server_metrics(endpoint_name, response_status_code, elapsed_ms,
|
|
|