You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We collect too many data points for self-hosted telemetry which we don't need, this is because self-hosting telemetry is coupled with cloud analytics while they should be two separate concerns
That data is pushed to Cloudflare -> Jitsu -> Redshift which is highly inefficient
We don't have proper analytics for our cloud version
We don't have proper analytics for self-hosting usage
We don't give workspace owners any way to track their activity/usage (api calls, etc.)
Bonus: be able to run as an "open startup" long-term, sharing our metrics publicly
What
Replace the Cloudflare endpoint with a Tinybird endpoint in the Analytics service
Introduce a variable IS_ANALYTICS_ENABLED (default to false)
Pass that variable to the frontend, only send Track events to the backend if isAnalyticsEnabled
On the backend, remove the check on TELEMETRY_ENABLED and rely on IS_ANALYTICS_ENABLED instead
Introduce a private env variable TINYBIRD_PRIVATE_TOKEN
Replace t.twenty.com/api by api.tinybird.co/v0/events?name=${DATASOURCE}
Build a simple service that sends a post request to the former Cloudflare url
We just want to track new users / workspaces. We'll need to get a sense of usage in the future but maybe we can collect 1/100 events or something like that... TBC
Next
Track API usage, track function usage...
Dashboard for each workspace to view their usage (api calls, function calls, etc.)
Use it for throttling / billing
Metabase connector?
The text was updated successfully, but these errors were encountered:
#7091
EventTrackers send information of events to the TinyBird instance:
In order to test:
1. Set ANALYTICS_ENABLED= true and TELEMETRY_ENABLED=true in
evironment-variables.ts
2. Set the TINYBIRD_TOKEN in environment variables (go to TiniyBird
Tokens)
3. Log in to twenty's TinyBird and go to datasources/analytics_events in
twenty_analytics workspace
4. Run twenty and navigate it
5. New events will be logged in the datasources, containing their
timestamp, sessionId and payload.
<img width="1189" alt="Screenshot 2024-09-24 at 17 23 01"
src="https://github.com/user-attachments/assets/85375897-504d-4e75-98e4-98e6a9671f98">
Example of payload when user is not logged in
```
{"hostName":"localhost",
"pathname":"/welcome",
"locale":"en-US",
"userAgent":"Mozilla/5.0",
"href":"http://localhost:3001/welcome",
"referrer":"",
"timeZone":"Europe/Barcelona"}
```
Example of payload when user is logged in
```
{"userId":"2020202",
"workspaceId":"202",
"workspaceDisplayName":"Apple",
"workspaceDomainName":"apple.dev",
"hostName":"localhost",
"pathname":"/objects/companies",
"locale":"en-US",
"userAgent":"Mozilla/5.0Chrome/128.0.0.0Safari/537.36",
"href":"http://localhost:3001/objects/companies",
"referrer":"",
"timeZone":"Europe/Paris"}
```
---------
Co-authored-by: Félix Malfait <[email protected]>
Problems
What
Replace the Cloudflare endpoint with a Tinybird endpoint in the Analytics service
Introduce a new service dedicated to Telemetry
The text was updated successfully, but these errors were encountered: