Skip to content

Commit

Permalink
feat: async reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Jan 22, 2025
1 parent 1c13a88 commit c4f0304
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/tower_error_tracker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ defmodule TowerErrorTracker do

@impl true
def report_event(event) do
TowerErrorTracker.Reporter.report_event(event)
value = Process.get(:error_tracker_context, %{})

Tower.async(fn ->
Process.put(:error_tracker_context, value)

TowerErrorTracker.Reporter.report_event(event)
end)
end
end

0 comments on commit c4f0304

Please sign in to comment.