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
Temporarily disable ingest metrics (#5369)
hq1b96e96a7f6ec
diff --git a/lib/plausible/ingestion/event.ex b/lib/plausible/ingestion/event.exindex 5453a247be..7078c185e0 100644--- a/lib/plausible/ingestion/event.ex+++ b/lib/plausible/ingestion/event.ex@@ -103,26 +103,13 @@ defmodule Plausible.Ingestion.Event doend@spec emit_telemetry_buffered(t()) :: :ok- def emit_telemetry_buffered(event) do- :telemetry.execute(telemetry_event_buffered(), %{}, %{- domain: event.domain,- request_timestamp: event.request.timestamp,- tracker_script_version: event.request.tracker_script_version- })+ def emit_telemetry_buffered(_event) do+ :okend@spec emit_telemetry_dropped(t(), drop_reason()) :: :ok- def emit_telemetry_dropped(event, reason) do- :telemetry.execute(- telemetry_event_dropped(),- %{},- %{- domain: event.domain,- reason: reason,- request_timestamp: event.request.timestamp,- tracker_script_version: event.request.tracker_script_version- }- )+ def emit_telemetry_dropped(_event, _reason) do+ :okenddefp pipeline() dodiff --git a/test/plausible/ingestion/counters/telemetry_handler_test.exs b/test/plausible/ingestion/counters/telemetry_handler_test.exsindex 084fb31ab7..d5b710a04c 100644--- a/test/plausible/ingestion/counters/telemetry_handler_test.exs+++ b/test/plausible/ingestion/counters/telemetry_handler_test.exs@@ -26,6 +26,7 @@ defmodule Plausible.Ingestion.Counters.TelemetryHandlerTest doend)end+ @tag :skiptest "handles ingest events by aggregating the counts", %{test: test} doon_exit(:detach, fn ->:telemetry.detach("ingest-counters-#{test}")diff --git a/test/plausible/ingestion/counters_test.exs b/test/plausible/ingestion/counters_test.exsindex e60d091a25..98d0e6a98b 100644--- a/test/plausible/ingestion/counters_test.exs+++ b/test/plausible/ingestion/counters_test.exs@@ -13,6 +13,7 @@ defmodule Plausible.Ingestion.CountersTest do@ts ~N[2023-02-14 01:00:03]describe "integration" do+ @tag :skiptest "periodically flushes buffer aggregates to the database", %{test: test} doon_exit(:detach, fn ->:telemetry.detach("ingest-counters-#{test}")@@ -46,6 +47,7 @@ defmodule Plausible.Ingestion.CountersTest doverify_record_written(buffered.domain, "buffered", 1, site_id)end+ @tag :skiptest "the database eventually sums the records within 1-minute buckets", %{test: test} do# Testing if the database works is an unfunny way of integration testing,# but on the upside it's quite straight-forward way of testing if the@@ -81,6 +83,7 @@ defmodule Plausible.Ingestion.CountersTest doverify_record_written(event1.domain, "dropped_not_found", 3)end+ @tag :skiptest "dumps the buffer on shutdown", %{test: test} doon_exit(:detach, fn ->:telemetry.detach("ingest-counters-#{test}")diff --git a/test/plausible/ingestion/event_telemetry_test.exs b/test/plausible/ingestion/event_telemetry_test.exsindex 5dbf138dfb..2d49bb5b61 100644--- a/test/plausible/ingestion/event_telemetry_test.exs+++ b/test/plausible/ingestion/event_telemetry_test.exs@@ -7,6 +7,7 @@ defmodule Plausible.Ingestion.EventTelemetryTest douse Plausible.DataCase, async: false+ @tag :skiptest "telemetry is emitted for all events", %{test: test} dotest_pid = self()