Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPP-3831: Send metrics_event data to influxdb, logs instead of UA #5108

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

jwhitlock
Copy link
Member

For MPP-3831, send the /metrics-event data to InfluxDB (tagged counter metric) and logs instead of Universal Analytics, which was retired July 1, 2024. The metric is fx.private.relay.metrics_event, and has the UA data as tags. The info-level log has the message metrics_event, with the UA data as extra JSON-encoded data. The log includes a truncated hash of the UUID4 generated by the extension, so that we can continue to estimate active installations. We could just log the UUID4 as well, but this ensures we can't easily go from logs to an extension.

I removed the thread code that was talking to Universal Analytics. Since we're talking to in-cluster services instead of a remote service, the data collection should be fast again. It was a cool hack.

The send_ga_ping code is sending data to the deprecated Universal
Analytics endpoint, which drops the data. Instead, send the core data as
a tagged counter metric, and as a log message. The log includes a
truncated hash of the GA UUID, to allow estimation of unique users. The
metric does not include the GA UUID, to avoid high-cardinality issues.
@jwhitlock jwhitlock requested a review from groovecoder October 15, 2024 16:01
@@ -19,7 +19,6 @@ dockerflow==2024.4.2
drf-spectacular==0.27.2
drf-spectacular-sidecar==2024.7.1
glean_parser==15.0.1
google-measurement-protocol==1.1.0
Copy link
Member

Choose a reason for hiding this comment

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

praise: nice clean-up.

privaterelay/views.py Outdated Show resolved Hide resolved
@jwhitlock jwhitlock enabled auto-merge October 15, 2024 19:46
@jwhitlock jwhitlock added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit 9ba06ce Oct 15, 2024
29 checks passed
@jwhitlock jwhitlock deleted the metrics_event_no_ga_mpp_3831 branch October 15, 2024 20:04
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