@leracherry/tracelens-storage-file
v1.0.0
Published
TraceLens storage-file: frontend performance debugging
Downloads
630
Maintainers
Readme
@leracherry/tracelens-storage-file
JSON file storage for TraceLens v1.0.0.
Installation
Install from npm using the command below, or see GitHub Packages authentication. Both registries use the same package names. Keep all TraceLens packages on matching versions.
npm install @leracherry/[email protected]Usage
import { FileStorage } from '@leracherry/tracelens-storage-file';
const storage = new FileStorage('./traces/session.json');
await storage.append(events);
const interactions = await storage.query({ type: 'interaction' });Node.js-only StorageAdapter backed by a JSON array. Each append reads and rewrites the file; it is intended for small local traces, not concurrent writers or production ingestion. clear() overwrites the file with an empty array. Sanitize events before storing them.
See the guide and release notes. Licensed MIT.
