Skip to content

Commit

Permalink
Merge pull request #459 from naymspace/feature/improve-sentry
Browse files Browse the repository at this point in the history
Demo: improve Sentry data
  • Loading branch information
Flo0807 authored Jul 10, 2024
2 parents ef67c20 + c633bf6 commit 70c800b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion demo/lib/demo_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ defmodule DemoWeb.Endpoint do
signing_salt: "szYoVHQC"
]

socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]]
socket "/live", Phoenix.LiveView.Socket,
websocket: [
connect_info: [:peer_data, :uri, :user_agent, session: @session_options]
]

# Serve at "/" the static files from "priv/static" directory.
#
Expand Down
2 changes: 1 addition & 1 deletion demo/lib/demo_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule DemoWeb.Router do

backpex_routes()

live_session :default, on_mount: Backpex.InitAssigns do
live_session :default, on_mount: [Sentry.LiveViewHook, Backpex.InitAssigns] do
live_resources "/users", UserLive
live_resources "/products", ProductLive
live_resources "/invoices", InvoiceLive, only: [:index]
Expand Down

0 comments on commit 70c800b

Please sign in to comment.