How to trace income request header #4761
Answered
by
ruslandoga
zuk22
asked this question in
Self-Hosted Support
-
Hi! $ cd hosting
$ docker compose exec plausible bin/plausible remote and there you can add a tracer for the iex> headers = fn {:trace, _pid, :call, {_mod, _fun, [%Plug.Conn{req_headers: headers}]}} -> inspect(headers) end
iex> mod_fun_args = {PlausibleWeb.RemoteIP, :get, 1}
iex> how_many_times = 5
iex> :recon_trace.calls(mod_fun_args, how_many_times, formatter: headers) Example output for: curl http://localhost:8000/api/event -d '{"name": "pageview","url":"https://dummy.site/baldur","domain":"dummy.site","referrer":null,"screen_width":520}' -H 'content-type: application/json'
Originally posted by @ruslandoga in #2767 (reply in thread) |
Beta Was this translation helpful? Give feedback.
Answered by
ruslandoga
Oct 31, 2024
Replies: 1 comment 3 replies
-
👋 @zuk22 Yes, it should still work.
Do you see any errors in the output? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should run it from the directory with
compose.yml
file, i.e. the directory where you clonedplausible/community-edition