Quick Start

Let's get started with Telemetry!

Welcome to Telemetry! Telemetry is a logging and analytics platform designed to help you capture, store, and query your data effortlessly. Whether you're tracking application metrics, monitoring user behavior, or analyzing business performance, Telemetry provides a seamless experience with consistent APIs across multiple programming languages.

If you're interested in learning more about how Telemetry works under the hood, check out our Telemetry Architecture Doc for a detailed overview. For a more in-depth use case, such as tracking OpenAI costs by instrumenting API calls, refer to our guide on Tracking OpenAI Costs.

Install Telemetry

This tutorial uses JavaScript. For other languages, please refer to the individual SDKs. The overall API structure is consistent across different programming languages.

npm install telemetry-sh

Log some data

Telemetry automatically creates tables when data is logged. In the following example, we log some Uber ride data to a table called uber_rides. Telemetry will automatically create this table and its corresponding schema with columns: city, price, and timestamp.

import telemetry from "telemetry-sh";

telemetry.init("YOUR_API_KEY");

telemetry.log("uber_rides", {
  city: "paris",
  price: 42,
  timestamp: new Date().toISOString()
});

Explore data with our UI

You can do all sorts of different visualizations and queries in our interactive UI located at https://telemetry.sh.

Query some data

You can integrate telemetry into your product or internal dashboards by querying the data using SQL through our query API.

const results = 
  await telemetry.query(`
    SELECT
      city,
      AVG(price)
    FROM
      uber_rides
    GROUP BY
      city
  `);

Last updated