Skip to content

Commit a159974

Browse files
move ReportLatencyCounters to ReplyWithError
1 parent 35977c7 commit a159974

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/core/http_proxy/http_req.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ namespace NKikimr::NHttpProxy {
382382
}
383383

384384
void ReplyWithError(const TActorContext& ctx, NYdb::EStatus status, const TString& errorText, size_t issueCode = ISSUE_CODE_GENERIC) {
385+
ReportLatencyCounters(ctx);
385386
/* deprecated metric: */ ctx.Send(MakeMetricsServiceID(),
386387
new TEvServerlessProxy::TEvCounter{
387388
1, true, true,
@@ -478,7 +479,6 @@ namespace NKikimr::NHttpProxy {
478479
HttpContext.ContentType == MIME_CBOR);
479480
FillOutputCustomMetrics<TProtoResult>(
480481
*(dynamic_cast<TProtoResult*>(ev->Get()->Message.Get())), HttpContext, ctx);
481-
ReportLatencyCounters(ctx);
482482
/* deprecated metric: */ ctx.Send(MakeMetricsServiceID(),
483483
new TEvServerlessProxy::TEvCounter{1, true, true,
484484
BuildLabels(Method, HttpContext, "api.http.success_per_second", setStreamPrefix)
@@ -506,7 +506,7 @@ namespace NKikimr::NHttpProxy {
506506
RetryCounter.Click();
507507
if (RetryCounter.HasAttemps()) {
508508
return HttpContext.Driver ? SendGrpcRequest(ctx) : SendGrpcRequestNoDriver(ctx);
509-
}
509+
}
510510
case ERetryErrorClass::NoRetry: {
511511
TString errorText;
512512
TStringOutput stringOutput(errorText);

0 commit comments

Comments
 (0)