Log
The log API is how you get data into Telemetry. These events could be anything from user interactions to system metrics, such as CPU usage spikes or memory leaks. The endpoint accepts data in any form of valid JSON, making it really easy to integrate into your code.
POST https://api.telemetry.sh/log
Headers
Content-Type
String
application/json
Authorization
String
<YOUR_API_KEY>
Body
table
String
The table where you want to log data
data
JSON
The data you want to log
Example Usage with cURL
To send Uber ride data to a table named uber_rides
using cURL, you can use the following command:
Using the JavaScript SDK
We recommend using our SDKs for a better developer experience. Here’s an example of how to use our JavaScript SDK:
Bulk logging
You can also pass in an array of objects to bulk ingest events. This is useful for limiting the number of requests to the API. For example, instead of:
You can do:
This will ingest the data as two rows.
Last updated