原文中文,约700字,阅读约需2分钟。
📝
内容提要
文章讨论了Plausible调试方案,提供了使用Docker和Kubernetes进行调试的具体命令和步骤,并提到通过将nginx-ingress的运行模式改为hostPort来解决问题。
🎯
关键要点
-
使用Docker调试Plausible的具体命令:$ cd hosting $ docker compose exec plausible bin/plausible remote
-
使用Kubernetes调试Plausible的命令:$ kubectl -n plausible exec -it statefulsets/app -- bin/plausible remote
-
通过设置函数来检查请求头:headers = fn {:trace, _pid, :call, {_mod, _fun, [%Plug.Conn{req_headers: headers}]}} -> inspect(headers) end
-
调用PlausibleWeb.RemoteIP模块的get函数进行追踪:mod_fun_args = {PlausibleWeb.RemoteIP, :get, 1}
-
设置追踪次数为5:how_many_times = 5
-
最后将nginx-ingress的运行模式改为hostPort以解决问题
🏷️