Skip to content

Conversation

@mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Oct 21, 2024

Describe your changes

Metrics Migration Part 2: This PR adds a MetricsEvent proto for a single source of truth for event fields, as well as the infrastructure necessary to send event data to the testing Fivetran webhook in parallel with Segment. This includes building the anonymousId & context data fields for FW that we received by default from Segment.

Testing Plan

  • JS Unit Tests: ✅
  • Manual Testing: ✅
    See demo app here & metrics comparison app here

@mayagbarnes mayagbarnes added security-assessment-completed Security assessment has been completed for PR impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change labels Oct 21, 2024
@mayagbarnes mayagbarnes marked this pull request as ready for review October 22, 2024 04:48
@mayagbarnes mayagbarnes requested a review from a team as a code owner October 22, 2024 04:48
Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Added one general question related tot the event structure

string label = 22;


// Page Profile Event fields:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to keep this a flat structure? If nesting is fine we could potentially use an oneof here to have a better separation between the different event types, e.g.:

  oneof metadata {
    PageProfile page_profile = 1;
    MenuClick menu_click = 2;

In that case, we could potentially also reuse the existing page profile message by moving all the frontend added fields into it as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had same thought, but then DS confirmed during testing its much easier to work with in flat structure (Fivetran does not auto-flatten the same way Segment did) so they strongly preferred this version

@mayagbarnes mayagbarnes merged commit 27b5694 into metrics-migration Oct 23, 2024
@mayagbarnes mayagbarnes deleted the metrics/add-fivetran branch October 23, 2024 20:12
mayagbarnes added a commit that referenced this pull request Oct 24, 2024
**Metrics Migration Part 2:** This PR adds a `MetricsEvent` proto for a
single source of truth for event fields, as well as the infrastructure
necessary to send event data to the testing Fivetran webhook in parallel
with Segment. This includes building the `anonymousId` & `context` data
fields for FW that we received by default from Segment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants