t := telemetry.NewTelemetry()t.Init("YOUR_API_KEY")
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.
You can query the data using SQL through the query API.
query :=` SELECT city, AVG(price) AS average_price FROM uber_rides GROUP BY city`queryResponse, err := t.Query(query)if err !=nil { log.Fatal("Error querying data:", err)}fmt.Println("Query response:", queryResponse)