dashbitco / broadway_dashboard

Keep track of your Broadway pipelines from Phoenix LiveDashboard
https://elixir-broadway.org/
Apache License 2.0
213 stars 17 forks source link

Broadway pipelines tab fails to load #18

Closed amacciola closed 2 years ago

amacciola commented 2 years ago

Current versions i am using:

broadway 1.0.3
broadway_dashboard 0.2.2
broadway_kafka 0.3.4
phoenix_live_dashboard 0.6.4
phoenix_live_view 0.17.7

router.ex

live_dashboard "/dashboard",
        metrics: TelemetrySupervisor,
        additional_pages: [
          broadway: BroadwayDashboard
        ]
    end

Issue: Whenever i load up my /dashboard i am unable to access the /dashboard/broadway tab. It will load for a while and says the Dashboard is not connected.

Only meaningful log i can find

iex(cyn@10.50.0.65)1> 17:24:34.953 request_id=0558abf4-4a16-42a1-8232-e47e5a950a18 [info] GET /ingest/dashboard/broadway
iex(cyn@10.50.0.65)1> 17:24:34.970 request_id=0558abf4-4a16-42a1-8232-e47e5a950a18 [info] Sent 200 in 17ms
iex(cyn@10.50.0.65)1> 17:24:35.867 [info] CONNECTED TO Phoenix.LiveView.Socket in 95µs
  Transport: :websocket
  Serializer: Phoenix.Socket.V2.JSONSerializer
  Parameters: %{"_csrf_token" => "JXMuGARSIggZMRUFBjNjL3QrcCosUzYQHEK5wgQyKAahTj6BGJ6Oofcx", "vsn" => "2.0.0"}
iex(cyn@10.50.0.65)1> 17:24:35.961 [info] Function passed as a handler with ID {BroadwayDashboard.Telemetry, #PID<0.1495.0>} is local function.
This mean that it is either anonymous function or capture of function without module specified. That may cause performance penalty when calling such handler. For more details see note in `telemetry:attach/4` documentation.

Screen Shot 2022-05-10 at 7 14 20 PM

amacciola commented 2 years ago

Additional info: i am trying to run this on a 1 node k8s cluster with only 1 pod running for the application that is hosting the /dashboard

philss commented 2 years ago

@amacciola could you please check your browser console for error messages?

From what I could understand, the LiveView socket is not connecting.

amacciola commented 2 years ago

@philss i do see this in the console log errors when trying to make the connection

Screen Shot 2022-05-11 at 1 37 57 PM

josevalim commented 2 years ago

This is happening because LiveView in your app does not match LiveView in Dashboard. Make sure both are running on latest and you should be good!

amacciola commented 2 years ago

@josevalim thanks testing now

amacciola commented 2 years ago

@josevalim just to confirm it looks like i should be using

 broadway_dashboard 0.2.2
 phoenix_live_dashboard 0.6.4
 phoenix_live_view 0.17.7

since broadway_dashboard only references phoenix_live_dashboard and phoenix_live_dashboard references phoenix_live_view

josevalim commented 2 years ago

You need dashboard 0.6.5.

amacciola commented 2 years ago

@josevalim fixed it! thanks