Fix issues. (#58)

* Fix new(RestClientRef) declaration.

* Fix metrics name issue.
This commit is contained in:
Eugene Kabanov 2023-09-04 23:34:14 +03:00 committed by GitHub
parent eee1f7ad04
commit cb9353acd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -169,12 +169,12 @@ proc new*(t: typedesc[RestClientRef],
bufferSize: int = 4096,
userAgent = PrestoIdent,
socketFlags: set[SocketFlags] = {}
): RestResult[RestClientRef] =
): RestClientRef =
let session = HttpSessionRef.new(httpFlags, maxRedirections, connectTimeout,
headersTimeout, bufferSize, maxConnections,
idleTimeout, idlePeriod, socketFlags)
ok(RestClientRef(session: session, address: address, agent: userAgent,
flags: flags))
RestClientRef(session: session, address: address, agent: userAgent,
flags: flags)
proc new*(t: typedesc[RestClientRef],
ta: TransportAddress,

View File

@ -69,7 +69,7 @@ when defined(metrics):
endpoint = $route.routePath
icode = toInt(code)
scode = Base10.toString(uint64(toInt(code)))
presto_client_response_status_count.inc(1, @[endpoint, scode])
presto_server_response_status_count.inc(1, @[endpoint, scode])
proc processStatusMetrics(route: RestRoute, code: HttpCode,
duration: Duration) =