Skip to content

Dont log empty search params

Halil Coban requested to merge do-not-add-search-key-empty-params into master

What does this MR do and why?

Recently, an MR added environments page search query to logs with a meta.environment.search key. During maintainer code review a follow up was suggested.

Suggestion is, when the search query is empty, do not add meta.environment.search instead of logging it with an empty value. This MR implements that suggestion.

How to set up and validate locally

  1. Click Deployments => Environments
  2. Check log/development_json.log. It should not have a log entry with key meta.environment.search
  3. In the Environments page, search an environment with a query
  4. Check log/development_json.log again. It should have a log entry with key meta.environment.search and value being the query.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Halil Coban

Merge request reports