Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Use tags rather than context to annotate support hashes in Sentry (#3668)

hq1dc8210dd842f
diff --git a/lib/plausible_web/plugs/error_handler.ex b/lib/plausible_web/plugs/error_handler.ex
index 9eab40e493..ef4c218c18 100644
--- a/lib/plausible_web/plugs/error_handler.ex
+++ b/lib/plausible_web/plugs/error_handler.ex
@@ -14,7 +14,7 @@ defmodule PlausibleWeb.Plugs.ErrorHandler do
@impl Plug.ErrorHandler
def handle_errors(conn, %{kind: kind, reason: reason}) do
hash = Hahash.name({kind, reason})
- Sentry.Context.set_extra_context(%{hash: hash})
+ Sentry.Context.set_tags_context(%{hash: hash})
json(conn, %{error: "internal server error", support_hash: hash})
end
end