AkurAI Build
Menu

Public repository / master

AkurAI-Framework / crates/telemetry/examples/lifecycle.rs

Latest change 91bd2a37654909c5a3aef6ddd614991bd378ccb8 - feat: add shared lifecycle telemetry contract by Ólafur Búi Ólafsson

//! Shared lifecycle fixtures are deliberately independent of product internals.

use akurai_telemetry::{fixtures, TelemetryContext};

fn main() {
    let context = TelemetryContext::new("org-1", "workspace-1", "installation-1", "drive");
    let first = fixtures::first_value("event-1", &context, 1_700_000_000).unwrap();
    let active = fixtures::active_use("event-2", &context, 1_700_000_060).unwrap();

    assert_eq!(first.event_name, fixtures::FIRST_VALUE_EVENT);
    assert_eq!(active.event_name, fixtures::ACTIVE_USE_EVENT);
}