Skip to content

Telemetry & Success Metrics Reference

Applies to: All PRDs (Section 6: Success Metrics) Last Updated: February 2026 Provider: PostHog (via posthog_service.py), Keywords AI (LLM tracing)


How to Reference Telemetry in PRDs

Each PRD's "Success Metrics" section should map every metric to: 1. The PostHog event that measures it (or note that it needs to be created) 2. The property on that event that provides the value 3. The baseline (current value, or "N/A — not yet tracked")


Currently Tracked Events

Acquisition & Onboarding (PRDs 5, 6)

Event Key Properties Tracked In
user_discovered channel, persona_id First inbound message
phone_verification_completed user_id Twilio OTP completion
persona_selected persona_id, user_id Persona selection endpoint

Gap: No group_exposure event exists. PRDs 5 and 6 need this for viral attribution: "user X was in a group with Luna, then signed up."

Messaging & Engagement (PRDs 5, 7, 10)

Event Key Properties Tracked In
message_sent_user channel, persona_id, thread_id (hashed), message_length, message_type, contains_mention, detected_intent, workflow_triggered tracking_helper.py
message_sent_companion message_category, is_reflex, is_burst, burst_position, response_latency_ms, used_memories, memory_count, memory_types, relationship_stage tracking_helper.py
conversation_started hours_since_last, time_of_day, day_of_week, initiated_by Session start detection
conversation_ended duration_sec, user_messages_count, companion_messages_count, workflow_executions, memories_created, relationship_stage_start, relationship_stage_end Session end detection
group_thread_joined thread_id (hashed), group_size, persona_id Group detection
group_plan_summarized plan_type, has_time, has_location, participant_count Echo plan recap

Superpowers & Integrations (PRDs 1, 2, 10)

Event Key Properties Tracked In
integration_connected integration_type, persona_id, trigger_workflow OAuth callback
integration_disconnected integration_type, reason, days_connected OAuth revoke
superpower_enabled superpower_id, superpower_category, requires_oauth, has_required_oauth Install / enable
superpower_disabled superpower_id, superpower_category, days_enabled, usage_count Uninstall / disable
superpower_triggered superpower_id, superpower_category, trigger_source, workflow_id, has_required_oauth, trigger_time Runtime trigger
superpower_result_sent superpower_id, result_type, execution_duration_ms, data_items_found, action_suggested Result delivery
superpower_accepted superpower_id, action_type, response_time_sec User accepts suggestion
superpower_rejected superpower_id, rejection_type User rejects suggestion

Memory (PRD 7)

Event Key Properties Tracked In
memory_created memory_type, source, user_id supermemory_service.py
memory_retrieved query_type, result_count, latency_ms supermemory_service.py

Reminders (PRD 10)

Event Key Properties Tracked In
reminder_scheduled reminder_type, send_at_timestamp, hours_until_send, created_by Reminder creation
reminder_sent reminder_type, scheduled_at, sent_at, delay_ms, created_by Reminder delivery

Events Needed But Not Yet Tracked

PRDs should add these events as requirements:

PRD Needed Event Purpose
2 marketplace_app_viewed Discovery funnel: browse → view → install
2 marketplace_search_performed Search usage and zero-result rate
3 level_up User reaches a new companion level (properties: old_level, new_level, old_stage, new_stage, metrics_snapshot, is_premium)
3 relationship_stage_changed Derived stage changes from level boundary crossing (exists in relationship_service.py but not in standard catalog)
3 superpower_tier_up Superpower advances tier (properties: superpower_id, old_tier, new_tier, uses_count)
3 superpower_equipped User equips a superpower (properties: superpower_id, slot_index, slots_used, slots_available)
3 superpower_unequipped User unequips a superpower (properties: superpower_id, reason)
3 persona_modifier_applied Modifiers derived for conversation (properties: persona_id, modifier_count, modifier_types)
3 micro_ban_activated New micro-ban set applied at level boundary (properties: level, ban_count)
3 companion_switched Superpowers+ user switches companion (properties: old_companion, new_companion, old_companion_level, new_companion_level, is_level_transfer)
3 streak_day User maintains daily streak (properties: streak_length)
3 streak_broken User breaks streak (properties: streak_length_was)
3 slot_unlocked New superpower slot available (properties: new_slot_count, trigger)
5 group_exposure_created Track non-user exposure to Luna in groups
5 group_user_converted Track group-exposed user signing up
6 onboarding_step_completed Per-step funnel tracking (start, upload, analysis, match, verify, pay, activate)
6 onboarding_abandoned Drop-off detection with last completed step
8 safety_violation_detected Content moderation triggers (currently logged, not tracked as event)
10 proactive_message_sent Track proactive sends separately from user-initiated
10 proactive_message_suppressed Track anti-annoyance suppressions
12 upgrade_prompt_shown Track which upgrade trigger fired
12 upgrade_completed Track conversion from prompt to payment

Privacy Measures

All PostHog tracking follows these privacy rules:

Measure Implementation
Thread IDs SHA-256 hashed, truncated to 16 chars
Message content Never tracked (only message_length captured)
Sensitive identifiers Hashed via _hash_identifier()
Long strings Auto-truncated
UUIDs Converted to string format
Opt-out Analytics is no-op if POSTHOG_API_KEY is not configured

LLM Tracing (Keywords AI)

Separate from PostHog, all LLM calls are traced via Keywords AI for cost and latency monitoring:

Traced Operation Metadata
Every LLM call Model, tokens (prompt + completion), latency_ms, operation type
Moderation calls Model (omni-moderation-latest), user_id or persona_id, duration_ms

This data is available for cost modeling but is not in PostHog.