Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Telemetry Plugin (@lapis-notes/telemetry)

Source: packages/plugins/plugin-telemetry/src/

Package: @lapis-notes/telemetry. Manifest id: lapis-telemetry.

The telemetry package owns the registry-installable diagnostics leaf UI and persisted browser telemetry settings. The workspace shell still hosts the browser telemetry controller. The package remains in the monorepo for building official release artifacts, but the workspace no longer bundles or registers it by default.

Registration

  • View type: plugin:diagnostics.
  • Commands: app:open-telemetry-diagnostics, app:clear-telemetry-traces.
  • Settings tab under Core plugins.
  • Official registry identity: lapis-telemetry.
  • Install location: /.obsidian/plugins/lapis-telemetry; listed under Core plugins when installed provenance is official.
  • Official ESM runtime artifact: dist/main.mjs.

UI Ownership

The diagnostics view includes a sortable and filterable recent-trace table, segmented trace summary, selected trace detail header, span waterfall/tree, selected-span details sidebar, web vitals, measurements, and a clear-diagnostics action.

Diagnostics chrome inherits shared Obsidian-aligned theme surfaces, hairline borders, compact radii, and semantic accent/warning variables while preserving trace status, slow-span, and error state distinctions.

Runtime Contract

  • Reads app.telemetry.diagnostics.
  • manifest.json declares lapis.runtime.entries.workspace with ESM main.mjs, no CommonJS fallback, shared dependencies for @lapis-notes/api, svelte, and clsx, and requiresReloadOnUpdate: false.
  • The build validates retained bare imports against the generated public plugin-host shared externals list so private Svelte internals and UI subpaths are bundled instead of exposed as host APIs.
  • Loads and saves settings through external plugin data under /.obsidian/plugins/lapis-telemetry/data.json, with canonical plugin data mirrored through app configuration.
  • Applies settings through app.telemetry.configure(...) during plugin load.
  • Can persist diagnostics in vault-scoped IndexedDB.
  • Can clear both live and persisted diagnostics through the clear command.
  • Depends on the browser telemetry controller retaining recent trace/span structure.

Settings

  • enabled
  • captureWebVitals
  • debugLogging
  • persistDiagnostics
  • sampleRate
  • slowSpanThresholdMs
  • otlpEndpoint