mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-24 04:23:57 +03:00
29bd4e5f2d
Solves: https://github.com/twentyhq/private-issues/issues/74 **TLDR** When a serverless function is executed, the result is send to tinybird event data source. **In order to test:** 1. Set ANALYTICS_ENABLED to true 2. Put your TINYBIRD_INGEST_TOKEN from twenty_event_playground in your .env file 3. Don't forget to run the worker 4. Create your serverless function and run it 5. The event should be logged on the event datasource in twenty_event_playground **What is the structure of the payload of a serverless function event?** Here are two examples of the payload: `{"duration":37,"status":"SUCCESS","functionId":"a9fd87c0-af86-4e17-be3a-a6d3d961678a","functionName":"testingFunction"}` ` {"duration":34,"status":"ERROR","errorType":"ReferenceError","functionId":"a9fd87c0-af86-4e17-be3a-a6d3d961678a","functionName":"testingFunction"}` **Possible improvments** - Change the status(str) to success(bool) - Enrich data in the payload |
||
---|---|---|
.. | ||
@types | ||
patches | ||
scripts | ||
src | ||
test/integration | ||
.env.example | ||
.env.test | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
.swcrc | ||
jest-integration.config.ts | ||
jest.config.ts | ||
nest-cli.json | ||
package.json | ||
project.json | ||
tsconfig.build.json | ||
tsconfig.json | ||
tsconfig.scripts.json |