analytics/lib/plausible
Vini Brasil 8834486a19
Pass cached site struct down the ingestion pipeline (#3027)
* Pass cached site struct down the ingestion pipeline

Revenue goals need the cached site struct during ingestion to get the
goals name and currency. This cache lookup is not necessary as
`GateKeeper.check/1`, which is called first in the ingestion pipeline,
could already return the site struct from the cache.

This commit changes `GateKeeper.check/1` to return the site struct
instead of the site ID. Moreover, this commit changes the ingestion
pipeline to avoid calling the sites cache twice.

Related: https://github.com/plausible/analytics/pull/2957#discussion_r1203921549

* Remove revenue_goals unnecessary fallback

* Change duplicate child_id in cache test

* Remove revenue goal condition from cache query

* Remove Plausible.DataCase.reload/1
2023-06-14 14:39:06 +01:00
..
auth Wrap user deletion in DB transaction (#2964) 2023-05-24 14:23:23 +03:00
billing Ignore missing subscription on update (#2930) 2023-05-23 11:35:18 +03:00
data_migration use ecto_ch (#2890) 2023-05-25 09:26:50 +02:00
event Clean up after V2 migration (#2868) 2023-04-24 12:17:57 +02:00
funnel Implement backend core for funnels (#3023) 2023-06-13 14:01:39 +02:00
goal Implement backend core for funnels (#3023) 2023-06-13 14:01:39 +02:00
google use ecto_ch (#2890) 2023-05-25 09:26:50 +02:00
helpers improve transfer ownership error message (#2651) 2023-02-13 15:25:17 +01:00
imported Switch to new clickhouse adapter (ch/chto) (#2733) 2023-03-21 09:55:59 +01:00
ingestion Pass cached site struct down the ingestion pipeline (#3027) 2023-06-14 14:39:06 +01:00
sentry Use finch in sentry client (#1996) 2022-07-08 11:14:52 +03:00
session Clean up after V2 migration (#2868) 2023-04-24 12:17:57 +02:00
site Pass cached site struct down the ingestion pipeline (#3027) 2023-06-14 14:39:06 +01:00
stats Fix queries with wildcard goals (#3015) 2023-06-14 14:14:27 +01:00
telemetry Gatekeep ingestion pipeline (#2472) 2022-11-28 15:50:55 +01:00
application.ex Split clickhouse repos - making the main one read only (#2826) 2023-04-06 12:45:36 +02:00
async_insert_repo.ex Switch to new clickhouse adapter (ch/chto) (#2733) 2023-03-21 09:55:59 +01:00
cldr.ex Revenue tracking: Add currency field to goal creation (#2948) 2023-05-23 12:08:09 +02:00
clickhouse_event_v2.ex Revenue tracking: Ingestion and breakdown queries (#2957) 2023-06-12 18:29:17 +01:00
clickhouse_repo.ex Switch to new clickhouse adapter (ch/chto) (#2733) 2023-03-21 09:55:59 +01:00
clickhouse_session_v2.ex use ecto_ch (#2890) 2023-05-25 09:26:50 +02:00
data_migration.ex Make self-hosted data migration easier (#2865) 2023-04-21 09:33:57 +02:00
funnel.ex Implement backend core for funnels (#3023) 2023-06-13 14:01:39 +02:00
funnels.ex Implement backend core for funnels (#3023) 2023-06-13 14:01:39 +02:00
geo.ex Stop logging invalid_address errors from Locus (#2604) 2023-01-18 12:39:54 -03:00
goals.ex Pass cached site struct down the ingestion pipeline (#3027) 2023-06-14 14:39:06 +01:00
http_client.ex Trace external HTTP requests (#2419) 2022-11-07 15:05:12 -03:00
import_deletion_repo.ex Split clickhouse repos - making the main one read only (#2826) 2023-04-06 12:45:36 +02:00
ingest_repo.ex Switch to new clickhouse adapter (ch/chto) (#2733) 2023-03-21 09:55:59 +01:00
mailer_test.exs Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
mailer.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
open_telemetry.ex Remove ingestion requests and Oban queries from OTEL (#2543) 2022-12-27 11:14:36 +01:00
prom_ex.ex Add extra error info + telemetry for AsyncInsertRepo (#2708) 2023-02-25 13:39:24 +01:00
purge.ex Split clickhouse repos - making the main one read only (#2826) 2023-04-06 12:45:36 +02:00
repo.ex Pagination for sites listing (#994) 2021-05-05 16:17:59 +03:00
site.ex Add revenue metrics in StatsController instead of Stats.Breakdown (#3028) 2023-06-14 09:32:08 +01:00
sites.ex Associate goals with sites, not domains (#2828) 2023-04-10 10:51:36 +02:00
stats.ex Implement backend core for funnels (#3023) 2023-06-13 14:01:39 +02:00
themes.ex Adds dark mode to entire dashboard (#467) 2020-12-16 11:57:28 +02:00
timezones.ex Fix timezone list when time changes (#2268) 2022-09-26 12:30:20 +03:00