mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-22 17:46:08 +03:00
Fix b'GET' in prometheus metrics (#7503)
This commit is contained in:
parent
225c165087
commit
eafd103fc7
2 changed files with 5 additions and 2 deletions
1
changelog.d/7503.bugfix
Normal file
1
changelog.d/7503.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix incorrect `method` label on `synapse_http_matrixfederationclient_{requests,responses}` prometheus metrics.
|
|
@ -408,7 +408,7 @@ class MatrixFederationHttpClient(object):
|
|||
_sec_timeout,
|
||||
)
|
||||
|
||||
outgoing_requests_counter.labels(method_bytes).inc()
|
||||
outgoing_requests_counter.labels(request.method).inc()
|
||||
|
||||
try:
|
||||
with Measure(self.clock, "outbound_request"):
|
||||
|
@ -434,7 +434,9 @@ class MatrixFederationHttpClient(object):
|
|||
logger.info("Failed to send request: %s", e)
|
||||
raise_from(RequestSendFailed(e, can_retry=True), e)
|
||||
|
||||
incoming_responses_counter.labels(method_bytes, response.code).inc()
|
||||
incoming_responses_counter.labels(
|
||||
request.method, response.code
|
||||
).inc()
|
||||
|
||||
set_tag(tags.HTTP_STATUS_CODE, response.code)
|
||||
|
||||
|
|
Loading…
Reference in a new issue