Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Add extra error info + telemetry for AsyncInsertRepo (#2708)
Adam Rutkowski2d8775e5ef44
diff --git a/lib/plausible/ingestion/counters.ex b/lib/plausible/ingestion/counters.exindex 843080ed81..8c4b70aaef 100644--- a/lib/plausible/ingestion/counters.ex+++ b/lib/plausible/ingestion/counters.ex@@ -84,8 +84,12 @@ defmodule Plausible.Ingestion.Counters do{_, _} = AsyncInsertRepo.insert_all(Record, records)catch_, thrown ->- Logger.error(- "Caught an error when trying to flush ingest counters: #{inspect(thrown)}"+ Sentry.capture_message(+ "Caught an error when trying to flush ingest counters.",+ extra: %{+ number_of_records: Enum.count(records),+ error: inspect(thrown)+ })endenddiff --git a/lib/plausible/prom_ex.ex b/lib/plausible/prom_ex.exindex cf903eb013..ced0fd81e9 100644--- a/lib/plausible/prom_ex.ex+++ b/lib/plausible/prom_ex.ex@@ -9,7 +9,13 @@ defmodule Plausible.PromEx doPlugins.Application,Plugins.Beam,{Plugins.Phoenix, router: PlausibleWeb.Router, endpoint: PlausibleWeb.Endpoint},- {Plugins.Ecto, repos: [Plausible.Repo, Plausible.ClickhouseRepo, Plausible.IngestRepo]},+ {Plugins.Ecto,+ repos: [+ Plausible.Repo,+ Plausible.ClickhouseRepo,+ Plausible.IngestRepo,+ Plausible.AsyncInsertRepo+ ]},Plugins.Oban,Plausible.PromEx.Plugins.PlausibleMetrics]