-
Notifications
You must be signed in to change notification settings - Fork 75
blog: telemetry v2 blogpost #1031
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
base: main
Are you sure you want to change the base?
Conversation
There are a lot of unrelated changes in this PR |
commit: |
|
||
## Why we left posthog | ||
|
||
Alchemy used to use posthog for our platform analytics. While posthot was really easy to set up (see our example here) it simply didn't meet our needs. One of our most important metrics is the number of projects that use alchemy. In order to get quality analytics from posthog we would need to give each alchemy project a dedicated project id and maintain that id as a project grows; this proves to be quite a challenging issue. We can't just use a UUID and store it somewhere as alchemy doesn't have a config file, and we don't expect the `.alchemy` directory to be committed. We explored using various other solutions such as the root commit hash (unavailable for partial clone) or the git upstream url (breaks if origin changes) but none of these solutions were reliably enough. Ultimately we decided to identify projects based on multiple factors instead of having a single id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a new line break at "this proves to be quite a challenging issue."?
alchemy-web/src/content/docs/blog/2025-09-30-reworking-alchemys-telemetry.md
Show resolved
Hide resolved
|
||
Between not having a consistent project id, and multiple of our team members having experience with datalakes and large scale analytics solutions, we decided to switch to a more developer-oriented solutions. Just having all of our own data in-house so we can do whatever we want with it as we please. | ||
|
||
That being said posthog is great at what it does, and we will continue to use posthog for our web analytics where its still a great fit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jacob pointed out we should do the whole "compliment sandwhich thing" since we want to make it clear posthog isn't bad
We started with a few criteria | ||
- we wanted an OLAP database since they are great for analytics | ||
- we wanted something SQL based so we didn't have to learn a new query language | ||
- we wanted something to avoid the big cloud providers as we don't support GCP or Azure yet, and we are in the middle of revamping our AWS resources as part of our [effect](https://effect.website/) based rewrite. | ||
- we wanted something quick as the team was getting frustrated with our current analytics solution. | ||
- preferrably a nice controlplane api | ||
|
||
After looking at the options we decided to go with Clickhouse Cloud. It had a great controlplane api so making a resource was easy. First we generate a typescript api from Clickhouse's OpenAPI spec, then we write our alchemy resource. | ||
|
||
This is a simplified example, but we're omitting clickhouse's plethora of customization options for brevity, but the full resource is available [here](https://github.com/alchemy-framework/alchemy/blob/main/alchemy/src/clickhouse/service.ts). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try and avoid bullet point lists. Tell the story. I don't think we've told the story of needing a compound key.
```ts | ||
export const Service = Resource( | ||
"clickhouse::Service", | ||
async function ( | ||
this: Context<Service>, | ||
id: string, | ||
props: ServiceProps, | ||
): Promise<Service> { | ||
const api = createClickhouseApi(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way too much code. Why is this useful for the blog?
Blog started off great but then lost its narrative form. Let's try and convert it into narrative structure. |
No description provided.