While the object is always logged in the tracing logs, the log_full_request setting controls whether or not to log the query string as well or replace it with an empty string.
Important note: this PR additionally adds request
to the skip list of the tracing instrument, since the Http request would end up logging the raw query string from there.
With the option off (default):
Oct 22 14:46:55.263 INFOmerino_adm::remote_settings: Completed syncing quicksuggest records from Remote Settings, type: "adm.remote-settings.sync-done"
at merino-adm\src\remote_settings\mod.rs:192
in merino_adm::remote_settings::sync
in merino_web::providers::suggestion_provider_setup
in merino_web::endpoints::suggest::suggest with query_parameters: Query(SuggestQueryParameters { client_variants: [], providers: None }), suggestion_request: SuggestionRequest { accepts_english: true, city: None, country: None, device_info: DeviceInfo { os_family: Windows, form_factor: Desktop, browser: Firefox(100) }, dma: None, query: "", region: None }
in tracing_actix_web_mozlog::middleware::request with method: GET, path: /api/v1/suggest, rid: 8835f9df-8c53-418b-b0d7-9bc145e24315, agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
With the option on:
Oct 22 14:33:44.468 INFOmerino_adm::remote_settings: Completed syncing quicksuggest records from Remote Settings, type: "adm.remote-settings.sync-done"
at merino-adm\src\remote_settings\mod.rs:192
in merino_adm::remote_settings::sync
in merino_web::providers::suggestion_provider_setup
in merino_web::endpoints::suggest::suggest with query_parameters: Query(SuggestQueryParameters { client_variants: [], providers: None }), suggestion_request: SuggestionRequest { accepts_english: true, city: None, country: None, device_info: DeviceInfo { os_family: Windows, form_factor: Desktop, browser: Firefox(100) }, dma: None, query: "banana", region: None }
in tracing_actix_web_mozlog::middleware::request with method: GET, path: /api/v1/suggest, rid: 1078df3e-9ad1-4294-8bcf-4df7fa8ae3ba, agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"
Fixes #171