From d35897afda1644ebfc7e2dbfb10f70e040c3a7a3 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Thu, 6 Jun 2024 07:57:30 +0000 Subject: [PATCH] PMM-12913 remove PMM_LESS_LOG_NOISE envvar --- docker-compose.yml | 1 - docs/process/v2_to_v3_environment_variables.md | 4 ++-- managed/utils/interceptors/interceptors.go | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7317df4e0f..fdf544e5ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,6 @@ services: - AWS_ACCESS_KEY=${AWS_ACCESS_KEY} - AWS_SECRET_KEY=${AWS_SECRET_KEY} - REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN} - - PMM_LESS_LOG_NOISE=1 - PMM_RELEASE_PATH=/root/go/bin - PMM_ENABLE_ACCESS_CONTROL=${PMM_ENABLE_ACCESS_CONTROL:-0} - PMM_DEV_VERSION_SERVICE_URL=${PMM_DEV_VERSION_SERVICE_URL} diff --git a/docs/process/v2_to_v3_environment_variables.md b/docs/process/v2_to_v3_environment_variables.md index d112f1a0ae..df13de07ec 100644 --- a/docs/process/v2_to_v3_environment_variables.md +++ b/docs/process/v2_to_v3_environment_variables.md @@ -12,7 +12,7 @@ Below is a list of affected variables and their new names. | `DISABLE_BACKUP_MANAGEMENT` | `PMM_DISABLE_BACKUP_MANAGEMENT` | | | `ENABLE_AZUREDISCOVER` | `PMM_ENABLE_AZURE_DISCOVER` | | | `ENABLE_RBAC` | `PMM_ENABLE_ACCESS_CONTROL` | | -| `LESS_LOG_NOISE` | `PMM_LESS_LOG_NOISE` | | +| `LESS_LOG_NOISE` | | Removed in PMM v3 | | `METRICS_RESOLUTION` | `PMM_METRICS_RESOLUTION` | | | `METRICS_RESOLUTION_HR` | `PMM_METRICS_RESOLUTION_HR` | | | `METRICS_RESOLUTION_LR` | `PMM_METRICS_RESOLUTION_LR` | | @@ -24,7 +24,7 @@ Below is a list of affected variables and their new names. | `PERCONA_TEST_CHECKS_HOST` | | Removed in PMM v3, use `PMM_DEV_PERCONA_PLATFORM_ADDRESS` | | `PERCONA_TEST_CHECKS_INTERVAL` | | Removed in PMM v3 as it wasn't actually used. | | `PERCONA_TEST_CHECKS_PUBLIC_KEY` | | Removed in PMM v3, use `PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY` | -| `PERCONA_TEST_NICER_API` | `PMM_NICER_API` | Removed in PMM v3, it has become the default | +| `PERCONA_TEST_NICER_API` | | Removed in PMM v3 | | `PERCONA_TEST_PMM_CLICKHOUSE_ADDR` | `PMM_CLICKHOUSE_ADDR` | | | `PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE` | `PMM_CLICKHOUSE_BLOCK_SIZE` | | | `PERCONA_TEST_PMM_CLICKHOUSE_DATABASE` | `PMM_CLICKHOUSE_DATABASE` | | diff --git a/managed/utils/interceptors/interceptors.go b/managed/utils/interceptors/interceptors.go index f844304678..e58c86441f 100644 --- a/managed/utils/interceptors/interceptors.go +++ b/managed/utils/interceptors/interceptors.go @@ -19,7 +19,6 @@ package interceptors import ( "context" "io" - "os" "runtime/debug" "runtime/pprof" "time" @@ -93,8 +92,7 @@ func Unary(interceptor grpc.UnaryServerInterceptor) UnaryInterceptorType { // set logger l := logrus.WithField("request", logger.MakeRequestID()) ctx = logger.SetEntry(ctx, l) - - if info.FullMethod == "/server.v1.ServerService/Readiness" && os.Getenv("PMM_LESS_LOG_NOISE") != "" { + if info.FullMethod == "/server.v1.ServerService/Readiness" && l.Level < logrus.DebugLevel { l = logrus.NewEntry(logrus.New()) l.Logger.SetOutput(io.Discard) }