From 1cc1ce98ee1bcee4d1bcd670ed1c1b1da32a856e Mon Sep 17 00:00:00 2001 From: Athos Couto Date: Thu, 16 Sep 2021 19:08:35 -0300 Subject: [PATCH] Use metric instead of logs to reduce log volume --- dotnet/DataSources/ProductReviewRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/DataSources/ProductReviewRepository.cs b/dotnet/DataSources/ProductReviewRepository.cs index e0ba2a53..d155a019 100644 --- a/dotnet/DataSources/ProductReviewRepository.cs +++ b/dotnet/DataSources/ProductReviewRepository.cs @@ -79,7 +79,7 @@ public async Task> GetProductReviewsAsync(string productId) //_context.Vtex.Logger.Info("GetProductReviewsAsync", null, $"[{response.StatusCode}] {responseContent}"); if (response.StatusCode == HttpStatusCode.NotFound) { - _context.Vtex.Logger.Info("GetProductReviewsAsync", null, $"[{response.StatusCode}] {responseContent}"); + _context.Vtex.Logger.Metric("GetProductReviewsAsyncNotFound", 1, new (string, string)[]{("ProductId", productId)}); return null; } } @@ -298,7 +298,7 @@ public async Task ValidateKeyAndToken(string key, string token, string bas } else { - _context.Vtex.Logger.Info("ValidateKeyAndToken", null, $"[{response.StatusCode}]"); + _context.Vtex.Logger.Metric("ValidateKeyAndToken", 1, new []{("StatusCode", response.StatusCode.ToString())}); } } catch (Exception ex)