Merge pull request #37200 from kssenii/add-s3-requests-metric

Add S3Requests metric
This commit is contained in:
Kseniia Sumarokova 2022-05-14 10:08:21 +02:00 committed by GitHub
commit f4a8a0cefe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,7 @@
M(FilesystemCacheReadBuffers, "Number of active cache buffers") \
M(CacheFileSegments, "Number of existing cache file segments") \
M(CacheDetachedFileSegments, "Number of existing detached cache file segments") \
M(S3Requests, "S3 requests") \
namespace CurrentMetrics
{

View File

@ -37,6 +37,11 @@ namespace ProfileEvents
extern const Event S3WriteRequestsRedirects;
}
namespace CurrentMetrics
{
extern const Metric S3Requests;
}
namespace DB::ErrorCodes
{
extern const int NOT_IMPLEMENTED;
@ -160,6 +165,7 @@ void PocoHTTPClient::makeRequestInternal(
};
ProfileEvents::increment(select_metric(S3MetricType::Count));
CurrentMetrics::Increment metric_increment{CurrentMetrics::S3Requests};
try
{