Add S3Requests metric

This commit is contained in:
kssenii 2022-05-13 18:10:07 +02:00
parent 8b41a58352
commit 5dd3ad08a1
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
{