Skip to content

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Jul 24, 2023

Changes

Continuing from #3180

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@bundlemon
Copy link

bundlemon bot commented Jul 24, 2023

BundleMon

Unchanged files (7)
Status Path Size Limits
static/css/app.css
492.34KB -
static/js/dashboard.js
319KB -
static/js/app.js
40.11KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.08KB -
tracker/js/plausible.js
742B -
static/js/applyTheme.js
314B -

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@@ -36,6 +36,10 @@ defmodule Plausible.SentryFilter do
%{event | fingerprint: ["db_connection", reason]}
end

def before_send(%{extra: %{request: %Plausible.Ingestion.Request{}}} = event) do
%{event | fingerprint: ["ingestion_request"]}
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need to try that out...

Copy link
Contributor Author

@ruslandoga ruslandoga Jul 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentry.capture_message("oof", extra: %{request: %Plausible.Ingestion.Request{}})

https://eh-uo.sentry.io/share/issue/1cb9ceadb737491f8f230c1ec391e0bf/

🥲 "shared" issue doesn't include fingerprint info...

Here's what I'm seeing on my dashboard:

Screenshot 2023-07-24 at 18 38 51

@ruslandoga ruslandoga mentioned this pull request Jul 24, 2023
@ruslandoga ruslandoga force-pushed the request-jason-encoder branch from a595f74 to c185887 Compare July 24, 2023 11:19
@@ -27,6 +27,7 @@ defmodule Plausible.Ingestion.Request do

@max_url_size 2_000

@primary_key false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise {"id": null} is added to all requests during encoding.

@ruslandoga ruslandoga force-pushed the request-jason-encoder branch from c185887 to 0e99d0d Compare July 24, 2023 11:31
@ruslandoga ruslandoga force-pushed the request-jason-encoder branch from 0e99d0d to f05ba78 Compare July 24, 2023 11:33
@ruslandoga ruslandoga requested a review from aerosol July 24, 2023 11:33
@ruslandoga ruslandoga marked this pull request as ready for review July 24, 2023 11:33
test "enforces fingerprint for ingestion request" do
event =
Sentry.Event.create_event(
message: "oof",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful :)

Copy link
Member

@aerosol aerosol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent ♥️

@aerosol aerosol merged commit f3a1a9d into plausible:master Jul 24, 2023
@aerosol
Copy link
Member

aerosol commented Jul 24, 2023

Great work!

@ruslandoga ruslandoga deleted the request-jason-encoder branch July 24, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants