tauri-plugin-telemetry 0.1.0

Backend-agnostic analytics/telemetry plugin for Tauri v2 apps, with a reference Hono + Supabase backend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde_json::Value;
use std::sync::Arc;
use tauri::{State, command};

use crate::client::TelemetryClient;

#[command]
pub fn track_event(
    client: State<'_, Arc<TelemetryClient>>,
    name: &str,
    props: Option<Value>,
) -> Result<(), String> {
    client.track_event(name, props)
}