From 131b6f3fe9f809f98d61aa4b20aad200da285d5f Mon Sep 17 00:00:00 2001 From: Dan Schultzer <1254724+danschultzer@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:03:01 -0800 Subject: [PATCH 1/4] Fix OpentelemetryPhoenix tests --- .../test/integration_test.exs | 3 +-- .../test/opentelemetry_phoenix_test.exs | 15 +++------------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/instrumentation/opentelemetry_phoenix/test/integration_test.exs b/instrumentation/opentelemetry_phoenix/test/integration_test.exs index dbc18179..eb95a99f 100644 --- a/instrumentation/opentelemetry_phoenix/test/integration_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/integration_test.exs @@ -170,8 +170,7 @@ if otp_vsn >= 27 do } on_exit(fn -> - :telemetry.list_handlers([]) - |> Enum.each(fn h -> :telemetry.detach(h.id) end) + Enum.each(:telemetry.list_handlers([]), &:telemetry.detach(&1.id)) end) adapters diff --git a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs index 273b4d4c..4db0a596 100644 --- a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs @@ -18,19 +18,18 @@ defmodule OpentelemetryPhoenixTest do end setup do - Application.ensure_all_started([:telemetry]) :otel_simple_processor.set_exporter(:otel_exporter_pid, self()) + OpentelemetryPhoenix.setup(adapter: :cowboy2) + on_exit(fn -> - Application.stop(:telemetry) + Enum.each(:telemetry.list_handlers([]), &:telemetry.detach(&1.id)) end) :ok end test "records spans for Phoenix LiveView mount" do - OpentelemetryPhoenix.setup(adapter: :cowboy2) - :telemetry.execute( [:phoenix, :live_view, :mount, :start], %{system_time: System.system_time()}, @@ -53,8 +52,6 @@ defmodule OpentelemetryPhoenixTest do end test "records spans for Phoenix LiveView handle_params" do - OpentelemetryPhoenix.setup(adapter: :cowboy2) - :telemetry.execute( [:phoenix, :live_view, :handle_params, :start], %{system_time: System.system_time()}, @@ -77,8 +74,6 @@ defmodule OpentelemetryPhoenixTest do end test "records spans for Phoenix LiveView handle_event" do - OpentelemetryPhoenix.setup(adapter: :cowboy2) - :telemetry.execute( [:phoenix, :live_view, :handle_event, :start], %{system_time: System.system_time()}, @@ -101,8 +96,6 @@ defmodule OpentelemetryPhoenixTest do end test "handles exception during Phoenix LiveView handle_params" do - OpentelemetryPhoenix.setup(adapter: :cowboy2) - :telemetry.execute( [:phoenix, :live_view, :mount, :start], %{system_time: System.system_time()}, @@ -160,8 +153,6 @@ defmodule OpentelemetryPhoenixTest do end test "handles exceptions during Phoenix LiveView handle_event" do - OpentelemetryPhoenix.setup(adapter: :cowboy2) - :telemetry.execute( [:phoenix, :live_view, :handle_event, :start], %{system_time: System.system_time()}, From 2f9109c74974507e14c8808edbd9996d931f0138 Mon Sep 17 00:00:00 2001 From: Dan Schultzer <1254724+danschultzer@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:41:56 -0800 Subject: [PATCH 2/4] Refactor live view test --- .../opentelemetry_phoenix/.formatter.exs | 2 + instrumentation/opentelemetry_phoenix/mix.exs | 1 + .../opentelemetry_phoenix/mix.lock | 1 + .../test/opentelemetry_phoenix_test.exs | 82 +- .../test/support/phoenix_liveview_meta.ex | 1495 ----------------- 5 files changed, 73 insertions(+), 1508 deletions(-) delete mode 100644 instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex diff --git a/instrumentation/opentelemetry_phoenix/.formatter.exs b/instrumentation/opentelemetry_phoenix/.formatter.exs index 3ebaf3c2..adda45ca 100644 --- a/instrumentation/opentelemetry_phoenix/.formatter.exs +++ b/instrumentation/opentelemetry_phoenix/.formatter.exs @@ -1,5 +1,7 @@ # Used by "mix format" [ + import_deps: [:phoenix], + plugins: [Phoenix.LiveView.HTMLFormatter], line_length: 120, inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] ] diff --git a/instrumentation/opentelemetry_phoenix/mix.exs b/instrumentation/opentelemetry_phoenix/mix.exs index d2a9e18a..c231a395 100644 --- a/instrumentation/opentelemetry_phoenix/mix.exs +++ b/instrumentation/opentelemetry_phoenix/mix.exs @@ -77,6 +77,7 @@ defmodule OpentelemetryPhoenix.MixProject do {:opentelemetry_cowboy, "~> 1.0.0", only: [:dev, :test]}, {:ex_doc, "~> 0.36", only: [:dev], runtime: false}, {:phoenix, "~> 1.7", only: [:dev, :test]}, + {:phoenix_live_view, "~> 1.0.0", only: [:dev, :test]}, {:phoenix_html, "~> 4.1", only: [:dev, :test]}, {:plug_cowboy, "~> 2.5", only: [:dev, :test]}, {:bandit, "~> 1.5", only: [:dev, :test]}, diff --git a/instrumentation/opentelemetry_phoenix/mix.lock b/instrumentation/opentelemetry_phoenix/mix.lock index 54e8e310..19841bc9 100644 --- a/instrumentation/opentelemetry_phoenix/mix.lock +++ b/instrumentation/opentelemetry_phoenix/mix.lock @@ -36,6 +36,7 @@ "otel_http": {:hex, :otel_http, "0.2.0", "b17385986c7f1b862f5d577f72614ecaa29de40392b7618869999326b9a61d8a", [:rebar3], [], "hexpm", "f2beadf922c8cfeb0965488dd736c95cc6ea8b9efce89466b3904d317d7cc717"}, "phoenix": {:hex, :phoenix, "1.7.14", "a7d0b3f1bc95987044ddada111e77bd7f75646a08518942c72a8440278ae7825", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "c7859bc56cc5dfef19ecfc240775dae358cbaa530231118a9e014df392ace61a"}, "phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "1.0.1", "5389a30658176c0de816636ce276567478bffd063c082515a6e8368b8fc9a0db", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c0f517e6f290f10dbb94343ac22e0109437fb1fa6f0696e7c73967b789c1c285"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, "phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"}, "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, diff --git a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs index 4db0a596..d8bb018e 100644 --- a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs @@ -7,7 +7,63 @@ defmodule OpentelemetryPhoenixTest do require Record alias OpenTelemetry.SemConv.ExceptionAttributes - alias PhoenixLiveViewMeta, as: LiveViewMeta + + @socket Phoenix.LiveView.Utils.configure_socket( + %Phoenix.LiveView.Socket{ + endpoint: NnnnWeb.Endpoint, + router: NnnnnWeb.Router, + view: NnnnnWeb.MyTestLive + }, + %{ + connect_params: %{}, + connect_info: %{}, + root_view: NnnnnWeb.MyTestLive, + live_temp: %{} + }, + nil, + %{}, + URI.parse("https://localhost:4000/live?foo=bar") + ) + + @telemetry_meta_base %{ + socket: @socket, + params: %{"foo" => "bar"}, + uri: "https://localhost:4000/live?foo=bar", + telemetry_span_context: :dummy_ref + } + + @telemetry_meta_handle_params Map.put(@telemetry_meta_base, :event, "hello") + + @exception_meta %{ + reason: %RuntimeError{message: "stop"}, + stacktrace: [ + {NnnnnWeb.MyTestLive, :handle_params, 3, + [ + file: ~c"lib/nnnnn_web/live/my_test_live.ex", + line: 28, + error_info: %{module: Exception} + ]} + ], + kind: :error + } + + @telemetry_meta %{ + mount: %{ + start: @telemetry_meta_base, + stop: @telemetry_meta_base, + exception: @telemetry_meta_base + }, + handle_params: %{ + start: @telemetry_meta_base, + stop: @telemetry_meta_base, + exception: Map.merge(@telemetry_meta_base, @exception_meta) + }, + handle_event: %{ + start: @telemetry_meta_handle_params, + stop: @telemetry_meta_handle_params, + exception: Map.merge(@telemetry_meta_handle_params, @exception_meta) + } + } for {name, spec} <- Record.extract_all(from_lib: "opentelemetry/include/otel_span.hrl") do Record.defrecord(name, spec) @@ -33,13 +89,13 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :mount, :start], %{system_time: System.system_time()}, - LiveViewMeta.mount_start() + @telemetry_meta.mount.start ) :telemetry.execute( [:phoenix, :live_view, :mount, :stop], %{system_time: System.system_time()}, - LiveViewMeta.mount_stop() + @telemetry_meta.mount.stop ) assert_receive {:span, @@ -55,13 +111,13 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :handle_params, :start], %{system_time: System.system_time()}, - LiveViewMeta.handle_params_start() + @telemetry_meta.handle_params.start ) :telemetry.execute( [:phoenix, :live_view, :handle_params, :stop], %{system_time: System.system_time()}, - LiveViewMeta.handle_params_stop() + @telemetry_meta.handle_params.stop ) assert_receive {:span, @@ -77,13 +133,13 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :handle_event, :start], %{system_time: System.system_time()}, - LiveViewMeta.handle_event_start() + @telemetry_meta.handle_event.start ) :telemetry.execute( [:phoenix, :live_view, :handle_event, :stop], %{system_time: System.system_time()}, - LiveViewMeta.handle_event_stop() + @telemetry_meta.handle_event.stop ) assert_receive {:span, @@ -99,25 +155,25 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :mount, :start], %{system_time: System.system_time()}, - LiveViewMeta.mount_start(:exception) + @telemetry_meta.mount.start ) :telemetry.execute( [:phoenix, :live_view, :mount, :stop], %{system_time: System.system_time()}, - LiveViewMeta.mount_stop(:exception) + @telemetry_meta.mount.stop ) :telemetry.execute( [:phoenix, :live_view, :handle_params, :start], %{system_time: System.system_time()}, - LiveViewMeta.handle_params_start(:exception) + @telemetry_meta.handle_params.start ) :telemetry.execute( [:phoenix, :live_view, :handle_params, :exception], %{system_time: System.system_time()}, - LiveViewMeta.handle_params_exception(:exception) + @telemetry_meta.handle_params.exception ) assert_receive {:span, @@ -156,13 +212,13 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :handle_event, :start], %{system_time: System.system_time()}, - LiveViewMeta.handle_event_start(:exception) + @telemetry_meta.handle_event.start ) :telemetry.execute( [:phoenix, :live_view, :handle_event, :exception], %{system_time: System.system_time()}, - LiveViewMeta.handle_event_exception(:exception) + @telemetry_meta.handle_event.exception ) assert_receive {:span, diff --git a/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex b/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex deleted file mode 100644 index 27521b49..00000000 --- a/instrumentation/opentelemetry_phoenix/test/support/phoenix_liveview_meta.ex +++ /dev/null @@ -1,1495 +0,0 @@ -defmodule PhoenixLiveViewMeta do - def mount_start() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{}, []}, - connect_params: %{ - "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", - "_mounts" => 5, - "_track_static" => [ - "http://localhost:4000/assets/app.css", - "http://localhost:4000/assets/app.js" - ] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"}, - session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - } - end - - def mount_start(:exception) do - %{ - socket: %{ - id: "phx-F5N4UNBnc7walAAU", - private: %{ - connect_info: %{ - owner: IEx.Helpers.pid(0, 688, 0), - port: 4000, - private: %{ - :phoenix_live_view => - {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], - %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, - NnnnnWeb.Router => [], - :phoenix_endpoint => NnnnnWeb.Endpoint, - :plug_session_fetch => :done, - :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, - :before_send => [], - :phoenix_router => NnnnnWeb.Router, - :phoenix_request_logger => {"request_logger", "request_logger"}, - :phoenix_layout => %{_: false}, - :phoenix_format => "html", - :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} - }, - scheme: :http, - status: nil, - script_name: [], - state: :unset, - host: "localhost", - params: %{"foo" => "bar"}, - __struct__: Plug.Conn, - halted: false, - adapter: - {Plug.Cowboy.Conn, - %{ - pid: IEx.Helpers.pid(0, 540, 0), - port: 4000, - scheme: "http", - version: :"HTTP/1.1", - path: "/live", - host: "localhost", - peer: {{127, 0, 0, 1}, 56258}, - bindings: %{}, - ref: NnnnnWeb.Endpoint.HTTP, - cert: :undefined, - headers: %{ - "accept" => "text/html, - application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "accept-encoding" => "gzip, deflate, br", - "accept-language" => "en-US,en;q=0.5", - "connection" => "keep-alive", - "cookie" => - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "dnt" => "1", - "host" => "localhost:4000", - "referer" => "http://localhost:4000/live?foo=bar", - "sec-fetch-dest" => "document", - "sec-fetch-mode" => "navigate", - "sec-fetch-site" => "same-origin", - "upgrade-insecure-requests" => "1", - "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" - }, - method: "GET", - path_info: :undefined, - host_info: :undefined, - streamid: 7, - body_length: 0, - has_body: false, - qs: "foo=bar", - sock: {{127, 0, 0, 1}, 4000} - }}, - secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", - cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - }, - request_path: "/live", - method: "GET", - assigns: %{flash: %{}}, - remote_ip: {127, 0, 0, 1}, - req_headers: [ - {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, - {"accept-encoding", "gzip, deflate, br"}, - {"accept-language", "en-US,en;q=0.5"}, - {"connection", "keep-alive"}, - {"cookie", - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, - {"dnt", "1"}, - {"host", "localhost:4000"}, - {"referer", "http://localhost:4000/live?foo=bar"}, - {"sec-fetch-dest", "document"}, - {"sec-fetch-mode", "navigate"}, - {"sec-fetch-site", "same-origin"}, - {"upgrade-insecure-requests", "1"}, - {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} - ], - path_info: ["live"], - resp_headers: [ - {"cache-control", "max-age=0, private, must-revalidate"}, - {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, - {"referrer-policy", "strict-origin-when-cross-origin"}, - {"x-content-type-options", "nosniff"}, - {"x-download-options", "noopen"}, - {"x-frame-options", "SAMEORIGIN"}, - {"x-permitted-cross-domain-policies", "none"} - ], - resp_cookies: %{}, - resp_body: nil, - body_params: %{}, - path_params: %{}, - query_params: %{"foo" => "bar"}, - query_string: "foo=bar", - req_cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - } - }, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{flash: %{}}, []}, - connect_params: %{}, - root_view: NnnnnWeb.MyTestLive, - conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: nil, - root_pid: nil, - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"}, - session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - } - end - - def mount_stop() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{}, []}, - connect_params: %{ - "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", - "_mounts" => 5, - "_track_static" => [ - "http://localhost:4000/assets/app.css", - "http://localhost:4000/assets/app.js" - ] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"}, - session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - } - end - - def mount_stop(:exception) do - %{ - socket: %{ - id: "phx-F5N4UNBnc7walAAU", - private: %{ - connect_info: %{ - owner: IEx.Helpers.pid(0, 540, 0), - port: 4000, - private: %{ - :phoenix_live_view => - {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], - %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, - NnnnnWeb.Router => [], - :phoenix_endpoint => NnnnnWeb.Endpoint, - :plug_session_fetch => :done, - :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, - :before_send => [], - :phoenix_router => NnnnnWeb.Router, - :phoenix_request_logger => {"request_logger", "request_logger"}, - :phoenix_layout => %{_: false}, - :phoenix_format => "html", - :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} - }, - scheme: :http, - status: nil, - script_name: [], - state: :unset, - host: "localhost", - params: %{"foo" => "bar"}, - __struct__: Plug.Conn, - halted: false, - adapter: - {Plug.Cowboy.Conn, - %{ - pid: IEx.Helpers.pid(0, 540, 0), - port: 4000, - scheme: "http", - version: :"HTTP/1.1", - path: "/live", - host: "localhost", - peer: {{127, 0, 0, 1}, 56258}, - bindings: %{}, - ref: NnnnnWeb.Endpoint.HTTP, - cert: :undefined, - headers: %{ - "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "accept-encoding" => "gzip, deflate, br", - "accept-language" => "en-US,en;q=0.5", - "connection" => "keep-alive", - "cookie" => - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "dnt" => "1", - "host" => "localhost:4000", - "referer" => "http://localhost:4000/live?foo=bar", - "sec-fetch-dest" => "document", - "sec-fetch-mode" => "navigate", - "sec-fetch-site" => "same-origin", - "upgrade-insecure-requests" => "1", - "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" - }, - method: "GET", - path_info: :undefined, - host_info: :undefined, - streamid: 7, - body_length: 0, - has_body: false, - qs: "foo=bar", - sock: {{127, 0, 0, 1}, 4000} - }}, - secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", - cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - }, - request_path: "/live", - method: "GET", - assigns: %{flash: %{}}, - remote_ip: {127, 0, 0, 1}, - req_headers: [ - {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, - {"accept-encoding", "gzip, deflate, br"}, - {"accept-language", "en-US,en;q=0.5"}, - {"connection", "keep-alive"}, - {"cookie", - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, - {"dnt", "1"}, - {"host", "localhost:4000"}, - {"referer", "http://localhost:4000/live?foo=bar"}, - {"sec-fetch-dest", "document"}, - {"sec-fetch-mode", "navigate"}, - {"sec-fetch-site", "same-origin"}, - {"upgrade-insecure-requests", "1"}, - {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} - ], - path_info: ["live"], - resp_headers: [ - {"cache-control", "max-age=0, private, must-revalidate"}, - {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, - {"referrer-policy", "strict-origin-when-cross-origin"}, - {"x-content-type-options", "nosniff"}, - {"x-download-options", "noopen"}, - {"x-frame-options", "SAMEORIGIN"}, - {"x-permitted-cross-domain-policies", "none"} - ], - resp_cookies: %{}, - resp_body: nil, - body_params: %{}, - path_params: %{}, - query_params: %{"foo" => "bar"}, - query_string: "foo=bar", - req_cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - } - }, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{flash: %{}}, []}, - connect_params: %{}, - root_view: NnnnnWeb.MyTestLive, - conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: nil, - root_pid: nil, - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"}, - session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - } - end - - def handle_params_start() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{}, []}, - connect_params: %{ - "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", - "_mounts" => 5, - "_track_static" => [ - "http://localhost:4000/assets/app.css", - "http://localhost:4000/assets/app.js" - ] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"} - } - end - - def handle_params_start(:exception) do - %{ - socket: %{ - id: "phx-F5N4UNBnc7walAAU", - private: %{ - connect_info: %{ - owner: IEx.Helpers.pid(0, 540, 0), - port: 4000, - private: %{ - :phoenix_live_view => - {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], - %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, - NnnnnWeb.Router => [], - :phoenix_endpoint => NnnnnWeb.Endpoint, - :plug_session_fetch => :done, - :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, - :before_send => [], - :phoenix_router => NnnnnWeb.Router, - :phoenix_request_logger => {"request_logger", "request_logger"}, - :phoenix_layout => %{_: false}, - :phoenix_format => "html", - :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} - }, - scheme: :http, - status: nil, - script_name: [], - state: :unset, - host: "localhost", - params: %{"foo" => "bar"}, - __struct__: Plug.Conn, - halted: false, - adapter: - {Plug.Cowboy.Conn, - %{ - pid: IEx.Helpers.pid(0, 540, 0), - port: 4000, - scheme: "http", - version: :"HTTP/1.1", - path: "/live", - host: "localhost", - peer: {{127, 0, 0, 1}, 56258}, - bindings: %{}, - ref: NnnnnWeb.Endpoint.HTTP, - cert: :undefined, - headers: %{ - "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "accept-encoding" => "gzip, deflate, br", - "accept-language" => "en-US,en;q=0.5", - "connection" => "keep-alive", - "cookie" => - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "dnt" => "1", - "host" => "localhost:4000", - "referer" => "http://localhost:4000/live?foo=bar", - "sec-fetch-dest" => "document", - "sec-fetch-mode" => "navigate", - "sec-fetch-site" => "same-origin", - "upgrade-insecure-requests" => "1", - "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" - }, - method: "GET", - path_info: :undefined, - host_info: :undefined, - streamid: 7, - body_length: 0, - has_body: false, - qs: "foo=bar", - sock: {{127, 0, 0, 1}, 4000} - }}, - secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", - cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - }, - request_path: "/live", - method: "GET", - assigns: %{flash: %{}}, - remote_ip: {127, 0, 0, 1}, - req_headers: [ - {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, - {"accept-encoding", "gzip, deflate, br"}, - {"accept-language", "en-US,en;q=0.5"}, - {"connection", "keep-alive"}, - {"cookie", - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, - {"dnt", "1"}, - {"host", "localhost:4000"}, - {"referer", "http://localhost:4000/live?foo=bar"}, - {"sec-fetch-dest", "document"}, - {"sec-fetch-mode", "navigate"}, - {"sec-fetch-site", "same-origin"}, - {"upgrade-insecure-requests", "1"}, - {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} - ], - path_info: ["live"], - resp_headers: [ - {"cache-control", "max-age=0, private, must-revalidate"}, - {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, - {"referrer-policy", "strict-origin-when-cross-origin"}, - {"x-content-type-options", "nosniff"}, - {"x-download-options", "noopen"}, - {"x-frame-options", "SAMEORIGIN"}, - {"x-permitted-cross-domain-policies", "none"} - ], - resp_cookies: %{}, - resp_body: nil, - body_params: %{}, - path_params: %{}, - query_params: %{"foo" => "bar"}, - query_string: "foo=bar", - req_cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - } - }, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{flash: %{}}, []}, - connect_params: %{}, - root_view: NnnnnWeb.MyTestLive, - conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: nil, - root_pid: nil, - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"} - } - end - - def handle_params_exception(:exception) do - %{ - reason: %{message: "stop", __struct__: RuntimeError, __exception__: true}, - socket: %{ - id: "phx-F5N4UNBnc7walAAU", - private: %{ - connect_info: %{ - owner: IEx.Helpers.pid(0, 540, 0), - port: 4000, - private: %{ - :phoenix_live_view => - {NnnnnWeb.MyTestLive, [action: :index, router: NnnnnWeb.Router], - %{extra: %{}, name: :default, vsn: 1_698_660_624_598_806_627}}, - NnnnnWeb.Router => [], - :phoenix_endpoint => NnnnnWeb.Endpoint, - :plug_session_fetch => :done, - :plug_session => %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}, - :before_send => [], - :phoenix_router => NnnnnWeb.Router, - :phoenix_request_logger => {"request_logger", "request_logger"}, - :phoenix_layout => %{_: false}, - :phoenix_format => "html", - :phoenix_root_layout => %{"html" => {NnnnnWeb.Layouts, :root}} - }, - scheme: :http, - status: nil, - script_name: [], - state: :unset, - host: "localhost", - params: %{"foo" => "bar"}, - __struct__: Plug.Conn, - halted: false, - adapter: - {Plug.Cowboy.Conn, - %{ - pid: IEx.Helpers.pid(0, 540, 0), - port: 4000, - scheme: "http", - version: :"HTTP/1.1", - path: "/live", - host: "localhost", - peer: {{127, 0, 0, 1}, 56258}, - bindings: %{}, - ref: NnnnnWeb.Endpoint.HTTP, - cert: :undefined, - headers: %{ - "accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "accept-encoding" => "gzip, deflate, br", - "accept-language" => "en-US,en;q=0.5", - "connection" => "keep-alive", - "cookie" => - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "dnt" => "1", - "host" => "localhost:4000", - "referer" => "http://localhost:4000/live?foo=bar", - "sec-fetch-dest" => "document", - "sec-fetch-mode" => "navigate", - "sec-fetch-site" => "same-origin", - "upgrade-insecure-requests" => "1", - "user-agent" => "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0" - }, - method: "GET", - path_info: :undefined, - host_info: :undefined, - streamid: 7, - body_length: 0, - has_body: false, - qs: "foo=bar", - sock: {{127, 0, 0, 1}, 4000} - }}, - secret_key_base: "r3goJWs3YJg7L+ErgaLFRiHb/eKTnziWV9uvCsGnqVERvt+iHmi/hE+KNaQdxeBA", - cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - }, - request_path: "/live", - method: "GET", - assigns: %{flash: %{}}, - remote_ip: {127, 0, 0, 1}, - req_headers: [ - {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}, - {"accept-encoding", "gzip, deflate, br"}, - {"accept-language", "en-US,en;q=0.5"}, - {"connection", "keep-alive"}, - {"cookie", - "_lv_for_bug_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg; _new_phx_thing_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI; _code_code_ship_session=SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw; _post_checkout_survey_key=SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs; lb:session=SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4; lb:probe_cookie=; TawkConnectionTime=0; twk_idm_key=cYY3tqqSg04zLnS6YawTb; _nnnnn_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE"}, - {"dnt", "1"}, - {"host", "localhost:4000"}, - {"referer", "http://localhost:4000/live?foo=bar"}, - {"sec-fetch-dest", "document"}, - {"sec-fetch-mode", "navigate"}, - {"sec-fetch-site", "same-origin"}, - {"upgrade-insecure-requests", "1"}, - {"user-agent", "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0"} - ], - path_info: ["live"], - resp_headers: [ - {"cache-control", "max-age=0, private, must-revalidate"}, - {"x-request-id", "F5N4UNBMNggiGpQAAAkE"}, - {"referrer-policy", "strict-origin-when-cross-origin"}, - {"x-content-type-options", "nosniff"}, - {"x-download-options", "noopen"}, - {"x-frame-options", "SAMEORIGIN"}, - {"x-permitted-cross-domain-policies", "none"} - ], - resp_cookies: %{}, - resp_body: nil, - body_params: %{}, - path_params: %{}, - query_params: %{"foo" => "bar"}, - query_string: "foo=bar", - req_cookies: %{ - "TawkConnectionTime" => "0", - "_code_code_ship_session" => - "SFMyNTY.g3QAAAADbQAAAAtfY3NyZl90b2tlbm0AAAAYdURLR0trQ1hMTWtGSGVpdVE0NWlJazJ4bQAAAA5saXZlX3NvY2tldF9pZG0AAAA7dXNlcnNfc2Vzc2lvbnM6cFJLVzhrRE5FeV81QXBHcUhRclFiVm5rYmhNMEVqZjBJZlJaZTZuVXVIVT1tAAAACnVzZXJfdG9rZW5tAAAAIKUSlvJAzRMv-QKRqh0K0G1Z5G4TNBI39CH0WXup1Lh1.zc3o2UgvDzA3oHGH05uQBmUaULQb9OdlRCO4eSIfKKw", - "_lv_for_bug_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVzd2TUxibkZfT18zZ1MtRTZTYVRkbDlK.Bews6_G-WYi2tQkYdUFMVRwgHfuTsjDOhUFKGlFfjWg", - "_new_phx_thing_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYVDlGbWJiR0ZvdlhBUTJmdDd4R21KSENr.9DZqxBhUxC_4disJpQTKmGGdxjD_-besgywvgDUeStI", - "_nnnnn_key" => - "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYaWFTdFF6V3dhTFVhbE96Z1NGVjNCTVBH.M5SpEDNbodElmj0iPdY3Wf4s56sZhMxTEYZBVB3LPfE", - "_post_checkout_survey_key" => - "SFMyNTY.g3QAAAAFbQAAAAtfY3NyZl90b2tlbm0AAAAYNU5XTFJZSjRvTmlUNGZkN3I2SXFQMjg5bQAAAAlsYXN0X3NlZW50AAAACWQACl9fc3RydWN0X19kABRFbGl4aXIuTmFpdmVEYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWEHZAAEaG91cmEMZAALbWljcm9zZWNvbmRoAmIACcPgYQZkAAZtaW51dGVhBmQABW1vbnRoYQlkAAZzZWNvbmRhDWQABHllYXJiAAAH520AAAAHcHJldmlld2QABHRydWVtAAAACnNlc3Npb25faWRtAAAAFWpKZGFTTGtBclZvOWJCU1M2SHZCMW0AAAAHc2hvcF9pZG0AAAAVb3k5blJmVDRSck9UbzZLZ2RZN3p3.XeHQXPzOmkYdaQVjyqpkuy-p8nnRu2D6tdwbaB92tOs", - "lb:probe_cookie" => "", - "lb:session" => - "SFMyNTY.g3QAAAAFbQAAAAo4MDgwOnRva2VubQAAACDm9ONIw0zxpXZvvqpXq345ARj2LN3HhuvV9YmQdnN54G0AAAALX2NzcmZfdG9rZW5tAAAAGHVnRmt0bkxJZjFGX3dQQnVDZ0JOOGJXbG0AAAAPY3VycmVudF91c2VyX2lkbQAAACB4aW9hcnBodTM0eW42dnpmcHVrYnJpNnlnMjZ3YXpwdW0AAAANaWRlbnRpdHlfZGF0YXQAAAABZAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAAl1c2VyX2RhdGF0AAAABG0AAAAFZW1haWxkAANuaWxtAAAACWhleF9jb2xvcm0AAAAHI0ZBODA3Mm0AAAACaWRtAAAAIHhpb2FycGh1MzR5bjZ2emZwdWticmk2eWcyNndhenB1bQAAAARuYW1lZAADbmls.vHkagvvfi3SbQ7oGsnuh8hN_9zI_Pu4100A9cihQwD4", - "twk_idm_key" => "cYY3tqqSg04zLnS6YawTb" - } - }, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{flash: %{}}, []}, - connect_params: %{}, - root_view: NnnnnWeb.MyTestLive, - conn_session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"} - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: nil, - root_pid: nil, - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - stacktrace: [ - {NnnnnWeb.MyTestLive, :handle_params, 3, - [ - file: ~c"lib/nnnnn_web/live/my_test_live.ex", - line: 28, - error_info: %{module: Exception} - ]}, - {Phoenix.LiveView.Utils, :"-call_handle_params!/5-fun-0-", 5, - [file: ~c"lib/phoenix_live_view/utils.ex", line: 462]}, - {:telemetry, :span, 3, [file: ~c"/home/derek/Code/nnnnn/deps/telemetry/src/telemetry.erl", line: 321]}, - {Phoenix.LiveView.Static, :call_mount_and_handle_params!, 5, - [file: ~c"lib/phoenix_live_view/static.ex", line: 279]}, - {Phoenix.LiveView.Static, :render, 3, [file: ~c"lib/phoenix_live_view/static.ex", line: 119]}, - {Phoenix.LiveView.Controller, :live_render, 3, [file: ~c"lib/phoenix_live_view/controller.ex", line: 39]}, - {Phoenix.Router, :__call__, 5, [file: ~c"lib/phoenix/router.ex", line: 432]}, - {NnnnnWeb.Endpoint, :plug_builder_call, 2, [file: ~c"lib/nnnnn_web/endpoint.ex", line: 1]}, - {NnnnnWeb.Endpoint, :"call (overridable 3)", 2, [file: ~c"deps/plug/lib/plug/debugger.ex", line: 136]}, - {NnnnnWeb.Endpoint, :call, 2, [file: ~c"lib/nnnnn_web/endpoint.ex", line: 1]}, - {Phoenix.Endpoint.SyncCodeReloadPlug, :do_call, 4, - [file: ~c"lib/phoenix/endpoint/sync_code_reload_plug.ex", line: 22]}, - {Plug.Cowboy.Handler, :init, 2, [file: ~c"lib/plug/cowboy/handler.ex", line: 11]}, - {:cowboy_handler, :execute, 2, [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_handler.erl", line: 37]}, - {:cowboy_stream_h, :execute, 3, - [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_stream_h.erl", line: 306]}, - {:cowboy_stream_h, :request_process, 3, - [file: ~c"/home/derek/Code/nnnnn/deps/cowboy/src/cowboy_stream_h.erl", line: 295]}, - {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]} - ], - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"}, - kind: :error - } - end - - def handle_params_stop() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - connect_info: %{session: %{"_csrf_token" => "iaStQzWwaLUalOzgSFV3BMPG"}}, - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - assign_new: {%{}, []}, - connect_params: %{ - "_csrf_token" => "WicVN2INLT9RI2QiXQY1LwAhFGNvIiAA3FFC3wzH0o1C1IOHSgBP-opG", - "_mounts" => 5, - "_track_static" => [ - "http://localhost:4000/assets/app.css", - "http://localhost:4000/assets/app.js" - ] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {nil, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - uri: "http://localhost:4000/live?foo=bar", - params: %{"foo" => "bar"} - } - end - - def handle_event_start() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: - {39_937_697_276_181_388_757_385_442_171_495_723_205, - %{ - 2 => - {73_617_967_197_300_037_744_481_173_618_097_897_040, - %{ - 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 2 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {144_585_413_226_324_981_419_374_726_472_236_538_297, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 3 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {245_405_142_602_053_685_753_030_296_372_583_372_933, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }} - }}, - 3 => - {57_658_065_433_102_251_316_006_334_929_903_791_439, - %{ - 0 => - {111_334_535_098_600_973_939_295_926_462_112_722_006, - %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} - }} - }}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - params: %{}, - event: "hello" - } - end - - def handle_event_start(:exception) do - %{ - socket: %{ - id: "phx-F5N4Uz2FmAH4qwaD", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 540, 0), - router: NnnnnWeb.Router, - fingerprints: - {39_937_697_276_181_388_757_385_442_171_495_723_205, - %{ - 2 => - {73_617_967_197_300_037_744_481_173_618_097_897_040, - %{ - 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 2 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {144_585_413_226_324_981_419_374_726_472_236_538_297, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 3 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {245_405_142_602_053_685_753_030_296_372_583_372_933, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }} - }}, - 3 => - {33_984_160_809_218_664_543_582_638_264_118_753_933, - %{ - 0 => - {111_334_535_098_600_973_939_295_926_462_112_722_006, - %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} - }} - }}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - params: %{}, - event: "hello" - } - end - - def handle_event_exception(:exception) do - %{ - reason: %{message: "stop", __struct__: RuntimeError, __exception__: true}, - socket: %{ - id: "phx-F5N4Uz2FmAH4qwaD", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 540, 0), - router: NnnnnWeb.Router, - fingerprints: - {39_937_697_276_181_388_757_385_442_171_495_723_205, - %{ - 2 => - {73_617_967_197_300_037_744_481_173_618_097_897_040, - %{ - 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 2 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {144_585_413_226_324_981_419_374_726_472_236_538_297, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 3 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {245_405_142_602_053_685_753_030_296_372_583_372_933, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }} - }}, - 3 => - {33_984_160_809_218_664_543_582_638_264_118_753_933, - %{ - 0 => - {111_334_535_098_600_973_939_295_926_462_112_722_006, - %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} - }} - }}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - stacktrace: [ - {NnnnnWeb.MyTestLive, :handle_event, 3, - [ - file: ~c"lib/nnnnn_web/live/my_test_live.ex", - line: 32, - error_info: %{module: Exception} - ]}, - {Phoenix.LiveView.Channel, :"-view_handle_event/3-fun-0-", 3, - [file: ~c"lib/phoenix_live_view/channel.ex", line: 401]}, - {:telemetry, :span, 3, [file: ~c"/home/derek/Code/nnnnn/deps/telemetry/src/telemetry.erl", line: 321]}, - {Phoenix.LiveView.Channel, :handle_info, 2, [file: ~c"lib/phoenix_live_view/channel.ex", line: 221]}, - {:gen_server, :try_handle_info, 3, [file: ~c"gen_server.erl", line: 1077]}, - {:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 1165]}, - {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]} - ], - params: %{}, - kind: :error, - event: "hello" - } - end - - def handle_event_stop() do - %{ - socket: %{ - id: "phx-F5LbkYMazc6nbROF", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - handle_params: [], - mount: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - assigns: %{__changed__: %{}, flash: %{}, live_action: :index}, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: - {39_937_697_276_181_388_757_385_442_171_495_723_205, - %{ - 2 => - {73_617_967_197_300_037_744_481_173_618_097_897_040, - %{ - 0 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 1 => {33_937_828_406_068_249_838_328_265_119_631_535_217, %{}}, - 2 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {144_585_413_226_324_981_419_374_726_472_236_538_297, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 3 => - {33_937_828_406_068_249_838_328_265_119_631_535_217, - %{ - 0 => - {274_835_210_088_729_429_103_026_462_060_282_169_556, - %{ - 4 => - {300_060_512_685_841_123_442_872_429_368_334_441_616, - %{ - 1 => - {7_929_807_277_372_053_948_725_376_894_618_837_157, - %{ - 0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }}, - 5 => - {245_405_142_602_053_685_753_030_296_372_583_372_933, - %{0 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}}}}, - 7 => {206_108_695_073_089_763_669_587_230_053_011_233_172, %{}} - }} - }} - }}, - 3 => - {57_658_065_433_102_251_316_006_334_929_903_791_439, - %{ - 0 => - {111_334_535_098_600_973_939_295_926_462_112_722_006, - %{3 => {159_023_245_523_001_146_808_631_479_556_833_423_414, %{}}}} - }} - }}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - params: %{}, - event: "hello" - } - end - - def live_component_handle_event_start() do - %{ - socket: %{ - id: "phx-F5LcqnujE9_EGAsB", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - mount: [], - handle_params: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - assigns: %{ - id: 1, - __changed__: %{}, - flash: %{}, - myself: %{__struct__: Phoenix.LiveComponent.CID, cid: 1} - }, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {266_426_426_202_826_600_176_910_312_284_850_323_048, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - params: %{}, - event: "live component test", - component: NnnnnWeb.MyTestLive.MyLiveComponent - } - end - - def live_component_handle_event_stop() do - %{ - socket: %{ - id: "phx-F5LcqnujE9_EGAsB", - private: %{ - __temp__: %{}, - lifecycle: %{ - handle_info: [], - handle_event: [], - __struct__: Phoenix.LiveView.Lifecycle, - mount: [], - handle_params: [], - after_render: [] - }, - root_view: NnnnnWeb.MyTestLive - }, - __struct__: Phoenix.LiveView.Socket, - parent_pid: nil, - endpoint: NnnnnWeb.Endpoint, - view: NnnnnWeb.MyTestLive, - assigns: %{ - id: 1, - __changed__: %{}, - flash: %{}, - myself: %{__struct__: Phoenix.LiveComponent.CID, cid: 1} - }, - transport_pid: IEx.Helpers.pid(0, 540, 0), - root_pid: IEx.Helpers.pid(0, 548, 0), - router: NnnnnWeb.Router, - fingerprints: {266_426_426_202_826_600_176_910_312_284_850_323_048, %{}}, - redirected: nil, - host_uri: %{ - port: 4000, - scheme: "http", - path: nil, - host: "localhost", - __struct__: URI, - userinfo: nil, - fragment: nil, - query: nil, - authority: nil - } - }, - params: %{}, - event: "live component test", - component: NnnnnWeb.MyTestLive.MyLiveComponent - } - end -end From a8975ac9dd24ba2f2ccba74ccfee2596eb23c84e Mon Sep 17 00:00:00 2001 From: Dan Schultzer <1254724+danschultzer@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:16:30 -0800 Subject: [PATCH 3/4] Add LiveView url template attribute --- .../lib/opentelemetry_phoenix.ex | 24 +++++++- .../test/opentelemetry_phoenix_test.exs | 61 ++++++++++++------- 2 files changed, 60 insertions(+), 25 deletions(-) diff --git a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex index 14459ec5..24d64c8f 100644 --- a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex +++ b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex @@ -167,7 +167,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.mount", meta, - %{kind: :server} + live_view_start_opts(meta) ) end @@ -181,7 +181,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.handle_params", meta, - %{kind: :server} + live_view_start_opts(meta) ) end @@ -195,7 +195,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.handle_event##{event}", meta, - %{kind: :server} + live_view_start_opts(meta) ) end @@ -222,4 +222,22 @@ defmodule OpentelemetryPhoenix do OpenTelemetry.Span.set_status(ctx, OpenTelemetry.status(:error, "")) OpentelemetryTelemetry.end_telemetry_span(@tracer_id, meta) end + + defp live_view_start_opts(meta) do + %{ + kind: :server, + attributes: url_attributes(meta) + } + end + + defp url_attributes(%{uri: uri, socket: %{router: router}}) do + uri = URI.parse(uri) + + case Phoenix.Router.route_info(router, "GET", uri.path, uri.host) do + :error -> %{} + route_info -> %{URLAttributes.url_template() => route_info.route} + end + end + + defp url_attributes(_meta), do: %{} end diff --git a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs index d8bb018e..d8312403 100644 --- a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs @@ -1,3 +1,19 @@ +defmodule NnnnnWeb.Router do + use Phoenix.Router, helpers: false + + import Phoenix.LiveView.Router + + scope "/", NnnnnWeb do + scope "/resources/", ResourceLive do + live "/:resource_id", Show, :show + end + end +end + +defmodule NnnnnWeb.ResourceLive.Show do + use Phoenix.LiveView, log: false +end + defmodule OpentelemetryPhoenixTest do use ExUnit.Case, async: false doctest OpentelemetryPhoenix @@ -12,23 +28,24 @@ defmodule OpentelemetryPhoenixTest do %Phoenix.LiveView.Socket{ endpoint: NnnnWeb.Endpoint, router: NnnnnWeb.Router, - view: NnnnnWeb.MyTestLive + view: NnnnnWeb.ResourceLive.Show }, %{ connect_params: %{}, connect_info: %{}, - root_view: NnnnnWeb.MyTestLive, + root_view: NnnnnWeb.ResourceLive.Show, live_temp: %{} }, - nil, + :show, %{}, - URI.parse("https://localhost:4000/live?foo=bar") + URI.parse("https://localhost:4000/resources/123?foo=bar") ) @telemetry_meta_base %{ socket: @socket, params: %{"foo" => "bar"}, - uri: "https://localhost:4000/live?foo=bar", + uri: "https://localhost:4000/resources/123?foo=bar", + session: %{}, telemetry_span_context: :dummy_ref } @@ -37,9 +54,9 @@ defmodule OpentelemetryPhoenixTest do @exception_meta %{ reason: %RuntimeError{message: "stop"}, stacktrace: [ - {NnnnnWeb.MyTestLive, :handle_params, 3, + {NnnnnWeb.ResourceLive.Show, :handle_params, 3, [ - file: ~c"lib/nnnnn_web/live/my_test_live.ex", + file: ~c"lib/nnnnn_web/live/resources_live/show.ex", line: 28, error_info: %{module: Exception} ]} @@ -94,17 +111,17 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :mount, :stop], - %{system_time: System.system_time()}, + %{system_time: System.system_time(), duration: 10}, @telemetry_meta.mount.stop ) assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.mount", + name: "NnnnnWeb.ResourceLive.Show.mount", attributes: attributes )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} end test "records spans for Phoenix LiveView handle_params" do @@ -116,17 +133,17 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :handle_params, :stop], - %{system_time: System.system_time()}, + %{system_time: System.system_time(), duration: 10}, @telemetry_meta.handle_params.stop ) assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.handle_params", + name: "NnnnnWeb.ResourceLive.Show.handle_params", attributes: attributes )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} end test "records spans for Phoenix LiveView handle_event" do @@ -138,17 +155,17 @@ defmodule OpentelemetryPhoenixTest do :telemetry.execute( [:phoenix, :live_view, :handle_event, :stop], - %{system_time: System.system_time()}, + %{system_time: System.system_time(), duration: 10}, @telemetry_meta.handle_event.stop ) assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.handle_event#hello", + name: "NnnnnWeb.ResourceLive.Show.handle_event#hello", attributes: attributes )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} end test "handles exception during Phoenix LiveView handle_params" do @@ -178,20 +195,20 @@ defmodule OpentelemetryPhoenixTest do assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.mount", + name: "NnnnnWeb.ResourceLive.Show.mount", attributes: attributes )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.handle_params", + name: "NnnnnWeb.ResourceLive.Show.handle_params", attributes: attributes, events: events )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} [ event( @@ -223,12 +240,12 @@ defmodule OpentelemetryPhoenixTest do assert_receive {:span, span( - name: "NnnnnWeb.MyTestLive.handle_event#hello", + name: "NnnnnWeb.ResourceLive.Show.handle_event#hello", attributes: attributes, events: events )} - assert %{} == :otel_attributes.map(attributes) + assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} [ event( From 9fce9a5415d23b48fce66cfe26e1f6b0c122211a Mon Sep 17 00:00:00 2001 From: Dan Schultzer <1254724+danschultzer@users.noreply.github.com> Date: Sat, 14 Dec 2024 07:55:29 -0800 Subject: [PATCH 4/4] Use code attributes for plug/action --- .../lib/opentelemetry_phoenix.ex | 27 ++++++++------ .../test/integration_test.exs | 5 +-- .../test/opentelemetry_phoenix_test.exs | 36 +++++++++++++++---- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex index 24d64c8f..81ad10de 100644 --- a/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex +++ b/instrumentation/opentelemetry_phoenix/lib/opentelemetry_phoenix.ex @@ -53,7 +53,7 @@ defmodule OpentelemetryPhoenix do end """ - alias OpenTelemetry.SemConv.Incubating.URLAttributes + alias OpenTelemetry.SemConv.Incubating.{CodeAttributes, URLAttributes} alias OpenTelemetry.Tracer @@ -148,8 +148,8 @@ defmodule OpentelemetryPhoenix do @doc false def handle_router_dispatch_start(_event, _measurements, meta, _config) do attributes = %{ - :"phoenix.plug" => meta.plug, - :"phoenix.action" => meta.plug_opts, + unquote(CodeAttributes.code_namespace()) => meta.plug, + unquote(CodeAttributes.code_function()) => meta.plug_opts, URLAttributes.url_template() => meta.route } @@ -167,7 +167,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.mount", meta, - live_view_start_opts(meta) + live_view_start_opts(meta, :mount) ) end @@ -181,7 +181,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.handle_params", meta, - live_view_start_opts(meta) + live_view_start_opts(meta, :handle_params) ) end @@ -195,7 +195,7 @@ defmodule OpentelemetryPhoenix do @tracer_id, "#{inspect(live_view)}.handle_event##{event}", meta, - live_view_start_opts(meta) + live_view_start_opts(meta, :handle_event) ) end @@ -223,10 +223,10 @@ defmodule OpentelemetryPhoenix do OpentelemetryTelemetry.end_telemetry_span(@tracer_id, meta) end - defp live_view_start_opts(meta) do + defp live_view_start_opts(meta, function) do %{ kind: :server, - attributes: url_attributes(meta) + attributes: url_attributes(meta) ++ code_attributes(meta.socket.view, function) } end @@ -234,10 +234,17 @@ defmodule OpentelemetryPhoenix do uri = URI.parse(uri) case Phoenix.Router.route_info(router, "GET", uri.path, uri.host) do - :error -> %{} - route_info -> %{URLAttributes.url_template() => route_info.route} + :error -> [] + route_info -> [{URLAttributes.url_template(), route_info.route}] end end defp url_attributes(_meta), do: %{} + + defp code_attributes(module, function) do + [ + {unquote(CodeAttributes.code_namespace()), module}, + {unquote(CodeAttributes.code_function()), function} + ] + end end diff --git a/instrumentation/opentelemetry_phoenix/test/integration_test.exs b/instrumentation/opentelemetry_phoenix/test/integration_test.exs index eb95a99f..5a9e103c 100644 --- a/instrumentation/opentelemetry_phoenix/test/integration_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/integration_test.exs @@ -131,6 +131,7 @@ if otp_vsn >= 27 do alias OpenTelemetry.SemConv.NetworkAttributes alias OpenTelemetry.SemConv.ServerAttributes alias OpenTelemetry.SemConv.UserAgentAttributes + alias OpenTelemetry.SemConv.Incubating.CodeAttributes alias OpenTelemetry.SemConv.Incubating.HTTPAttributes alias OpenTelemetry.SemConv.Incubating.URLAttributes @@ -238,8 +239,8 @@ if otp_vsn >= 27 do {URLAttributes.url_query(), "a=1&b=abc"}, {URLAttributes.url_scheme(), :http}, {URLAttributes.url_template(), "/users/:user_id"}, - {:"phoenix.action", :user}, - {:"phoenix.plug", OpentelemetryPhoenix.Integration.TracingTest.TestController} + {CodeAttributes.code_function(), :user}, + {CodeAttributes.code_namespace(), OpentelemetryPhoenix.Integration.TracingTest.TestController} ] for {attr, val} <- expected_attrs do diff --git a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs index d8312403..7a1b937e 100644 --- a/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs +++ b/instrumentation/opentelemetry_phoenix/test/opentelemetry_phoenix_test.exs @@ -121,7 +121,11 @@ defmodule OpentelemetryPhoenixTest do attributes: attributes )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :mount, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } end test "records spans for Phoenix LiveView handle_params" do @@ -143,7 +147,11 @@ defmodule OpentelemetryPhoenixTest do attributes: attributes )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :handle_params, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } end test "records spans for Phoenix LiveView handle_event" do @@ -165,7 +173,11 @@ defmodule OpentelemetryPhoenixTest do attributes: attributes )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :handle_event, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } end test "handles exception during Phoenix LiveView handle_params" do @@ -199,7 +211,11 @@ defmodule OpentelemetryPhoenixTest do attributes: attributes )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :mount, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } assert_receive {:span, span( @@ -208,7 +224,11 @@ defmodule OpentelemetryPhoenixTest do events: events )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :handle_params, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } [ event( @@ -245,7 +265,11 @@ defmodule OpentelemetryPhoenixTest do events: events )} - assert :otel_attributes.map(attributes) == %{:"url.template" => "/resources/:resource_id"} + assert :otel_attributes.map(attributes) == %{ + :"url.template" => "/resources/:resource_id", + :"code.function" => :handle_event, + :"code.namespace" => NnnnnWeb.ResourceLive.Show + } [ event(