diff --git a/lib/plausible/application.ex b/lib/plausible/application.ex index d46aa5997..07f43d93b 100644 --- a/lib/plausible/application.ex +++ b/lib/plausible/application.ex @@ -22,7 +22,6 @@ defmodule Plausible.Application do ] opts = [strategy: :one_for_one, name: Plausible.Supervisor] - setup_opentelemetry() setup_sentry() setup_cache_stats() Location.load_all() @@ -54,13 +53,6 @@ defmodule Plausible.Application do ) end - def setup_opentelemetry() do - OpentelemetryPhoenix.setup() - OpentelemetryEcto.setup([:plausible, :repo]) - OpentelemetryEcto.setup([:plausible, :clickhouse_repo]) - OpentelemetryOban.setup() - end - def report_cache_stats() do case Cachex.stats(:user_agents) do {:ok, stats} -> diff --git a/lib/plausible/event/write_buffer.ex b/lib/plausible/event/write_buffer.ex index b265cbc36..6dc3e7ed8 100644 --- a/lib/plausible/event/write_buffer.ex +++ b/lib/plausible/event/write_buffer.ex @@ -1,7 +1,6 @@ defmodule Plausible.Event.WriteBuffer do use GenServer require Logger - use OpenTelemetryDecorator def start_link(_opts) do GenServer.start_link(__MODULE__, [], name: __MODULE__) @@ -55,7 +54,6 @@ defmodule Plausible.Event.WriteBuffer do do_flush(buffer) end - @decorate trace("ingest.flush_events") defp do_flush(buffer) do case buffer do [] -> diff --git a/lib/plausible/session/write_buffer.ex b/lib/plausible/session/write_buffer.ex index 18f6ed037..12f2664c5 100644 --- a/lib/plausible/session/write_buffer.ex +++ b/lib/plausible/session/write_buffer.ex @@ -1,7 +1,6 @@ defmodule Plausible.Session.WriteBuffer do use GenServer require Logger - use OpenTelemetryDecorator def start_link(_opts) do GenServer.start_link(__MODULE__, [], name: __MODULE__) @@ -43,7 +42,6 @@ defmodule Plausible.Session.WriteBuffer do flush(buffer) end - @decorate trace("ingest.flush_sessions") defp flush(buffer) do case buffer do [] -> diff --git a/lib/plausible_web/controllers/api/external_controller.ex b/lib/plausible_web/controllers/api/external_controller.ex index 66ab5132c..fff48e228 100644 --- a/lib/plausible_web/controllers/api/external_controller.ex +++ b/lib/plausible_web/controllers/api/external_controller.ex @@ -1,6 +1,5 @@ defmodule PlausibleWeb.Api.ExternalController do use PlausibleWeb, :controller - use OpenTelemetryDecorator require Logger def event(conn, _params) do @@ -50,7 +49,6 @@ defmodule PlausibleWeb.Api.ExternalController do }) end - @decorate trace("ingest.parse_user_agent") defp parse_user_agent(conn) do user_agent = Plug.Conn.get_req_header(conn, "user-agent") |> List.first() @@ -423,7 +421,6 @@ defmodule PlausibleWeb.Api.ExternalController do 2_647_694 => 2_643_743 } - @decorate trace("ingest.geolocation") defp visitor_location_details(conn) do result = PlausibleWeb.RemoteIp.get(conn) @@ -464,7 +461,6 @@ defmodule PlausibleWeb.Api.ExternalController do defp ignore_unknown_country("ZZ"), do: nil defp ignore_unknown_country(country), do: country - @decorate trace("ingest.parse_referrer") defp parse_referrer(_, nil), do: nil defp parse_referrer(uri, referrer_str) do diff --git a/mix.exs b/mix.exs index 19eaa6269..2c9414e78 100644 --- a/mix.exs +++ b/mix.exs @@ -94,13 +94,6 @@ defmodule Plausible.MixProject do {:phoenix_pagination, "~> 0.7.0"}, {:hammer, "~> 6.0"}, {:public_suffix, git: "https://github.com/axelson/publicsuffix-elixir"}, - {:telemetry, "~> 1.0", override: true}, - {:opentelemetry, "1.0.0-rc.3"}, - {:open_telemetry_decorator, "~> 1.0.0-rc.3"}, - {:opentelemetry_exporter, "1.0.0-rc.3"}, - {:opentelemetry_phoenix, "1.0.0-rc.5"}, - {:opentelemetry_ecto, "1.0.0-rc.3"}, - {:opentelemetry_oban, "~> 0.2.0-rc.2"}, {:floki, "~> 0.32.0", only: :test}, {:referrer_blocklist, git: "https://github.com/plausible/referrer-blocklist.git"} ] diff --git a/mix.lock b/mix.lock index 360aee29f..7fc678c64 100644 --- a/mix.lock +++ b/mix.lock @@ -93,7 +93,7 @@ "siphash": {:hex, :siphash, "3.2.0", "ec03fd4066259218c85e2a4b8eec4bb9663bc02b127ea8a0836db376ba73f2ed", [:make, :mix], [], "hexpm", "ba3810701c6e95637a745e186e8a4899087c3b079ba88fb8f33df054c3b0b7c3"}, "sleeplocks": {:hex, :sleeplocks, "1.1.1", "3d462a0639a6ef36cc75d6038b7393ae537ab394641beb59830a1b8271faeed3", [:rebar3], [], "hexpm", "84ee37aeff4d0d92b290fff986d6a95ac5eedf9b383fadfd1d88e9b84a1c02e1"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, - "telemetry": {:hex, :telemetry, "1.0.0", "0f453a102cdf13d506b7c0ab158324c337c41f1cc7548f0bc0e130bbf0ae9452", [:rebar3], [], "hexpm", "73bc09fa59b4a0284efb4624335583c528e07ec9ae76aca96ea0673850aec57a"}, + "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, "telemetry_registry": {:hex, :telemetry_registry, "0.3.0", "6768f151ea53fc0fbca70dbff5b20a8d663ee4e0c0b2ae589590e08658e76f1e", [:mix, :rebar3], [{:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "492e2adbc609f3e79ece7f29fec363a97a2c484ac78a83098535d6564781e917"}, "timex": {:hex, :timex, "3.7.6", "502d2347ec550e77fdf419bc12d15bdccd31266bb7d925b30bf478268098282f", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "a296327f79cb1ec795b896698c56e662ed7210cc9eb31f0ab365eb3a62e2c589"}, "tzdata": {:hex, :tzdata, "1.1.0", "72f5babaa9390d0f131465c8702fa76da0919e37ba32baa90d93c583301a8359", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "18f453739b48d3dc5bcf0e8906d2dc112bb40baafe2c707596d89f3c8dd14034"},