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

[DENG-7616] Pipeline to send events to Amplitude #2729

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

scholtzan
Copy link
Contributor

@scholtzan scholtzan commented Feb 6, 2025

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 65.23077% with 113 lines in your changes missing coverage. Please review.

Project coverage is 84.71%. Comparing base (7b72969) to head (3fb59ea).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...java/com/mozilla/telemetry/AmplitudePublisher.java 0.00% 64 Missing ⚠️
...om/mozilla/telemetry/amplitude/AmplitudeEvent.java 45.71% 13 Missing and 6 partials ⚠️
...illa/telemetry/amplitude/ParseAmplitudeEvents.java 85.71% 11 Missing and 7 partials ⚠️
...telemetry/amplitude/AmplitudePublisherOptions.java 0.00% 4 Missing ⚠️
...m/mozilla/telemetry/amplitude/FilterByDocType.java 85.18% 2 Missing and 2 partials ⚠️
...telemetry/amplitude/InvalidAttributeException.java 50.00% 2 Missing ⚠️
...a/com/mozilla/telemetry/amplitude/SendRequest.java 96.72% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2729      +/-   ##
============================================
- Coverage     85.98%   84.71%   -1.27%     
- Complexity      876      935      +59     
============================================
  Files           118      125       +7     
  Lines          4994     5319     +325     
  Branches        504      535      +31     
============================================
+ Hits           4294     4506     +212     
- Misses          539      637      +98     
- Partials        161      176      +15     
Flag Coverage Δ
ingestion_beam 82.09% <65.23%> (-1.41%) ⬇️
ingestion_core 73.64% <ø> (ø)
ingestion_sink 84.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scholtzan scholtzan force-pushed the events-to-amplitude branch 2 times, most recently from 6e1c08d to 90ce8a6 Compare February 12, 2025 21:36
Comment on lines 59 to 83
if (getEventExtras() == null || getEventExtras().equals("null")) {
eventExtras.put("extras", (ObjectNode) new ObjectMapper().readTree("{}"));
} else {
eventExtras.put("extras", (ObjectNode) new ObjectMapper().readTree(getEventExtras()));
}

json.put("event_properties", eventExtras);
json.put("event_type", getEventType());
json.put("platform", getPlatform());

if (getAppVersion() != null && !getAppVersion().equals("null")) {
json.put("app_version", getAppVersion());
}

if (getOsName() != null && !getOsName().equals("null")) {
json.put("os_name", getOsName());
}

if (getOsVersion() != null && !getOsVersion().equals("null")) {
json.put("os_version", getOsVersion());
}

if (getCountry() != null && !getCountry().equals("null")) {
json.put("country", getCountry());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are the attributed currently sent to amplitude

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