Log warning when m/meta parameter used in ingestion (#5478)
* Log warning when m/meta parameter used in ingestion This parameter was added in October 2020 and then renamed 2 days later:40900c7653and0b6e645b44We are hoping we may be able to remove it which this logging will help with. * Log only domain
This commit is contained in:
parent
05e87c258d
commit
d4bec6d9e3
|
|
@ -24,6 +24,7 @@ defmodule Plausible.Ingestion.Request do
|
|||
|
||||
use Ecto.Schema
|
||||
use Plausible
|
||||
require Logger
|
||||
alias Ecto.Changeset
|
||||
|
||||
@max_url_size 2_000
|
||||
|
|
@ -230,6 +231,13 @@ defmodule Plausible.Ingestion.Request do
|
|||
|> Enum.take(@max_props)
|
||||
|> Map.new()
|
||||
|
||||
# Temporary instrumentation to see if `m`/`meta` field was used.
|
||||
if request_body["m"] || request_body["meta"] do
|
||||
Logger.warning(
|
||||
"Ingestion: request body contains meta field. domain=#{request_body["d"] || request_body["domain"]}"
|
||||
)
|
||||
end
|
||||
|
||||
changeset
|
||||
|> Changeset.put_change(:props, props)
|
||||
|> validate_props()
|
||||
|
|
|
|||
Loading…
Reference in New Issue