@stacksleuth/svelte-agent
v0.2.4
Published
Specialized Svelte performance monitoring agent - Component lifecycle tracking, store subscription monitoring, reactive state analysis, DOM mutation observation, and real-time memory profiling.
Downloads
150
Maintainers
Readme
@stacksleuth/svelte-agent
StackSleuth Svelte Agent
🚀 What is StackSleuth Svelte Agent?
Specialized Svelte performance monitoring agent - Component lifecycle tracking, store subscription monitoring, reactive state analysis, DOM mutation observation, and real-time memory profiling.
✨ Key Features
- 🔥 Svelte Component Tracking: Component lifecycle and performance monitoring
- 🗄️ Store Monitoring: Svelte store subscription and state tracking
- 🔄 Reactive State Analysis: Svelte reactivity system performance
- 🌐 DOM Mutation Tracking: Efficient DOM change monitoring
- 💾 Memory Profiling: Component memory usage optimization
- ⚡ SvelteKit Integration: Full-stack Svelte application monitoring
- 📊 Transition Analysis: Svelte transition and animation performance
- 🎯 Action Tracking: Custom action performance monitoring
📦 Installation
# npm
npm install @stacksleuth/svelte-agent
# yarn
yarn add @stacksleuth/svelte-agent
# pnpm
pnpm add @stacksleuth/svelte-agentyarn add @stacksleuth/svelte-agentpnpm add @stacksleuth/svelte-agent🏁 Quick Start
import { SvelteAgent } from '@stacksleuth/svelte-agent';
import App from './App.svelte';
// Initialize Svelte agent
const agent = new SvelteAgent({
enabled: true,
trackComponents: true,
trackStores: true,
monitorDOM: true
});
// Start monitoring
agent.startMonitoring();
// Initialize your Svelte app
const app = new App({
target: document.getElementById('app'),
props: {
name: 'world'
}
});
export default app;🛠️ Troubleshooting
Common Issues
Agent Not Starting
// Enable debug mode
const agent = new SvelteAgent({
enabled: true,
debug: true
});High Memory Usage
// Optimize memory usage
const agent = new SvelteAgent({
bufferSize: 500,
flushInterval: 5000,
sampleRate: 0.01
});Missing Metrics
- Check that the agent is enabled
- Verify your API key and project ID
- Ensure sampling rate allows data through
- Check network connectivity to StackSleuth API
Debug Mode
DEBUG=stacksleuth:* node your-app.js📚 Resources
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
MIT License - see the LICENSE file for details.
Website • Documentation • NPM Registry • GitHub
Made with ⚡ by StackSleuth
