Skip to content

feat: event tracking v2 #3922

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

Merged
merged 4 commits into from
Apr 22, 2025
Merged

Conversation

bodinsamuel
Copy link
Collaborator

@bodinsamuel bodinsamuel commented Apr 17, 2025

Changes

Fixes https://linear.app/nango/issue/NAN-3073/posthog-cleanup

  • Refactor analytics to be just internal event tracking
    • Removed call to DB in favor of explicit parameters when possible
    • Remove most events that were not deemed useful
  • Remove telemetry from self-hosted
    Not useful right now

@bodinsamuel bodinsamuel self-assigned this Apr 17, 2025
Copy link

linear bot commented Apr 17, 2025

NAN-3073 PostHog cleanup

@bodinsamuel bodinsamuel requested a review from a team April 17, 2025 13:51
Copy link
Collaborator

@TBonnin TBonnin left a comment

Choose a reason for hiding this comment

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

I have a question about why we use PostHog at all. But otherwise nice PR 👍

@@ -434,7 +435,7 @@ class SyncController {
try {
const { account, environment } = res.locals;

const { schedule_id, command, nango_connection_id, sync_id, sync_name, sync_variant, provider, delete_records } = req.body;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we stop passing those params in

schedule_id: string;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, I'll change that when migrating the endpoint

@@ -0,0 +1,79 @@
import { PostHog } from 'posthog-node';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not a huge fan of the naming eventTracking. Soon we are going to have billing events and I am sure more sort of events in the future.

I am also not super clear of the value of PostHog. @bastienbeurier How is it being used and what does PostHog provides that we cannot have without it?

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 am not a huge fan of the naming eventTracking. Soon we are going to have billing events and I am sure more sort of events in the future.

What would you propose? Analytics was also incorrect, maybe internalEventTracking? Billing events will be called billing events, so I'm not shocked.

I am also not super clear of the value of PostHog. @bastienbeurier How is it being used and what does PostHog provides that we cannot have without it?

I'll let Bastien complete, imo those are product events; with it we have dashboards, insights, Slack alerts, trends, etc. that allow us to have a better sense of what's happening for some critical part of the product. We could not achieve the same with DD because we are missing dimensions and/or sampling, and simply not made for that.
By removing most events it's clear that it's less useful I agree

Copy link
Member

Choose a reason for hiding this comment

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

I think it's a common argument from engs that DD can replace product analytics. Initially, it's somewhat true. But rapidly product analytics are used for a different set of events and surfacing (e.g. with Slack notifications).

Copy link
Collaborator

@TBonnin TBonnin Apr 18, 2025

Choose a reason for hiding this comment

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

got it. productEvent, productTracking or something similar then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let's go for productTracking

Copy link

gitguardian bot commented Apr 22, 2025

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
16627964 Triggered Username Password df95f50 packages/shared/lib/utils/utils.unit.test.ts View secret
16627965 Triggered Generic Password df95f50 packages/shared/lib/utils/utils.unit.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@bodinsamuel bodinsamuel merged commit b6d73da into master Apr 22, 2025
14 checks passed
@bodinsamuel bodinsamuel deleted the sam/25_04_17/fix/event-tracking-v2 branch April 22, 2025 09:33
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.

3 participants