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(platform): Platform Telemetry #2459

Merged
merged 15 commits into from
Jul 7, 2023
Merged

feat(platform): Platform Telemetry #2459

merged 15 commits into from
Jul 7, 2023

Conversation

poolsar42
Copy link
Collaborator

Description

Sets up PostHog for Analytics

Related Issues

Testing

TBD

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@@ -5,3 +5,6 @@ INTERNAL_GOOGLE_ANALYTICS_TAG = "G-NHNH4KRWC3"
STRIPE_API_SECRET = ""
STRIPE_WEBHOOK_SECRET = ""
STRIPE_PRO_PLAN_ID = ""

REACT_APP_PUBLIC_POSTHOG_KEY=""
Copy link
Contributor

Choose a reason for hiding this comment

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

POSTHOG_PUBLIC_KEY

@@ -5,3 +5,6 @@ INTERNAL_GOOGLE_ANALYTICS_TAG = "G-NHNH4KRWC3"
STRIPE_API_SECRET = ""
STRIPE_WEBHOOK_SECRET = ""
STRIPE_PRO_PLAN_ID = ""

REACT_APP_PUBLIC_POSTHOG_KEY=""
REACT_APP_PUBLIC_POSTHOG_HOST=""
Copy link
Contributor

Choose a reason for hiding this comment

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

POSTHOG_HOST

@poolsar42 poolsar42 self-assigned this Jul 5, 2023
@poolsar42 poolsar42 force-pushed the feat/2444-platform-telemetry branch from dab784a to 1f071f2 Compare July 5, 2023 16:15
@poolsar42 poolsar42 requested a review from szkl July 6, 2023 20:09
@poolsar42 poolsar42 marked this pull request as ready for review July 6, 2023 20:09
Copy link
Contributor

@szkl szkl left a comment

Choose a reason for hiding this comment

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

Define new environment variables in GitHub workflow configuration files.

Is it possible to match platform/posthog/tsconfig.json with others?

apps/console/app/entry.server.tsx Outdated Show resolved Hide resolved
apps/console/app/routes/apps/$clientId/auth.tsx Outdated Show resolved Hide resolved
apps/console/app/routes/apps/new.tsx Outdated Show resolved Hide resolved
apps/passport/app/components/Header/index.tsx Outdated Show resolved Hide resolved
platform/address/src/jsonrpc/methods/resolveAccount.ts Outdated Show resolved Hide resolved
platform/posthog/package.json Outdated Show resolved Hide resolved
platform/posthog/src/index.ts Outdated Show resolved Hide resolved
platform/posthog/wrangler.toml Outdated Show resolved Hide resolved
.github/workflows/main-address.yaml Outdated Show resolved Hide resolved
apps/passport/app/root.tsx Outdated Show resolved Hide resolved
},
}

await fetch(`${POSTHOG_PROXY_HOST}/e/`, init)
Copy link
Contributor

Choose a reason for hiding this comment

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

It is a good idea to just return here instead. Let the caller decide.

platform/posthog/package.json Outdated Show resolved Hide resolved
platform/posthog/package.json Outdated Show resolved Hide resolved
platform/posthog/wrangler.toml Outdated Show resolved Hide resolved
properties,
}: {
eventName: string
apiKey: string
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the only parameter representing the environment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, only one API key per app in PostHog

Our proxy worker sends requests with specific API key and then it gets sorted in posthog

@szkl szkl merged commit 44c3638 into main Jul 7, 2023
14 of 16 checks passed
@szkl szkl deleted the feat/2444-platform-telemetry branch July 7, 2023 14:56
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.

feat(platform): Platform Telemetry
2 participants