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

feat: Add Amplitude event publisher #487

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

spalmurray-codecov
Copy link
Contributor

@spalmurray-codecov spalmurray-codecov commented Jan 24, 2025

This PR adds a new EventPublisher abstraction and an implementation of it in AmplitudeEventPublisher. EventPublisher is meant to be extremely generic and could be reused for any types of events we may want to publish in the future (TaskService could be converted to an EventPublisher, for example).

The Amplitude implementation defines some starting events and their payloads. These will be used in a future API PR, once we have the API key set as an environment variable.

Closes codecov/engineering-team#2893

@spalmurray-codecov spalmurray-codecov changed the title (draft) Add Amplitude event tracker (draft) Add Amplitude event publisher Jan 27, 2025
@spalmurray-codecov spalmurray-codecov changed the title (draft) Add Amplitude event publisher feat: Add Amplitude event publisher Jan 30, 2025
@spalmurray-codecov spalmurray-codecov marked this pull request as ready for review January 30, 2025 00:13
from abc import ABC, abstractmethod


class EventPublisherPropertyException(Exception):
Copy link
Contributor

Choose a reason for hiding this comment

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

MissingEventPropertyException

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.97%. Comparing base (74c0888) to head (f27b504).

Current head f27b504 differs from pull request most recent head 37e756c

Please upload reports for the commit 37e756c to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #487      +/-   ##
==========================================
- Coverage   90.34%   89.97%   -0.37%     
==========================================
  Files         437      324     -113     
  Lines       12951     9048    -3903     
  Branches     2104     1599     -505     
==========================================
- Hits        11700     8141    -3559     
+ Misses       1133      846     -287     
+ Partials      118       61      -57     
Flag Coverage Δ
shared-docker-uploader ?

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.

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.

Plan out API for creating Amplitude events in JS/Python
2 participants