{"record":{"id":"dfdaa865a05b3a53","repo":"BoundaryML/baml","slug":"no-profile-store-at-0","errorCode":null,"errorMessage":"no profile store at {0}","messagePattern":"no profile store at (.+?)","errorType":"exception","errorClass":"TelemetryError","httpStatus":null,"severity":"info","filePath":"baml_language/crates/baml_lsp_server/src/playground_telemetry.rs","lineNumber":191,"sourceCode":"    }\n    let others: Vec<String> = workspace_roots[1..]\n        .iter()\n        .map(|root| root.display().to_string())\n        .collect();\n    tracing::warn!(\n        \"Telemetry: the profiler writes one store per process, so runs started \\\n         here for {} are recorded under {}. Those projects will look empty in \\\n         the Telemetry tab; run them from the CLI to record them in place.\",\n        others.join(\", \"),\n        workspace_roots[0].display()\n    );\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum TelemetryError {\n    /// No store yet: nothing has run under this project since the profiler\n    /// started writing. This is an empty state, not a failure.\n    #[error(\"no profile store at {0}\")]\n    NoStore(PathBuf),\n    #[error(\"{0}\")]\n    Query(String),\n}\n\n/// One execution: a row in the executions table.\n#[derive(Debug, Clone, Serialize)]\n#[serde(rename_all = \"camelCase\")]\npub struct ExecutionRow {\n    pub execution_id: String,\n    pub entry_fqn: Option<String>,\n    pub source_label: Option<String>,\n    pub revision_id: Option<String>,\n    pub status: Option<String>,\n    /// `complete` | `no_root_ended` | `root_started_lost` | `index_corrupt`.\n    /// Anything but `complete` means the row below it is partial evidence.\n    pub index_state: Option<String>,\n    /// `complete` | `partial` | `none` — whether captured values survived.","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_lsp_server/src/playground_telemetry.rs#L173-L209","documentation":"TelemetryError::NoStore is returned when the playground telemetry endpoint is queried but no profiler store file exists yet for the project. Per its doc comment this is an empty state, not a failure: nothing has executed under this project since the profiler started writing.","triggerScenarios":"Requesting telemetry data (executions table) before any BAML function has run in the project; pointing the telemetry query at a project directory with no profile store written yet; wiping/rotating the store directory while the server is up.","commonSituations":"Freshly opened project queried by the playground UI before the first run; tests hitting the telemetry endpoint with no prior executions; deleted or relocated .baml profile store files.","solutions":["Run at least one BAML function in the project to generate the profile store.","Verify the profile store path/directory the profiler writes to actually matches the queried project.","If the store was deleted, re-run your functions to regenerate it.","Treat this as an empty state in UI code — display 'no data yet' rather than an error."],"exampleFix":"// before\nlet rows = telemetry.latest_executions()?; // Err(NoStore(path))\n\n// after\nmatch telemetry.latest_executions() {\n    Ok(rows) => render(rows),\n    Err(TelemetryError::NoStore(_)) => render_empty(),\n    Err(e) => return Err(e.into()),\n}","handlingStrategy":"fallback","validationCode":"let store_exists = profile_store_path\n    .map(|p| p.exists())\n    .unwrap_or(false);\nif !store_exists { show_empty_state(); }","typeGuard":null,"tryCatchPattern":"match telemetry.query_executions() {\n    Ok(rows) => render(rows),\n    Err(TelemetryError::NoStore(_)) => render(\"No runs yet — execute a BAML function first\"),\n    Err(e) => warn(e),\n}","preventionTips":["Run at least one BAML function before querying telemetry","Don't delete or relocate the profiler's store directory while the LSP is live","Treat NoStore as empty data in UI code, not as an error"],"tags":["rust","telemetry","empty-state","profiling"],"backgroundTag":"file-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}