npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@stacksleuth/vue-agent

v0.2.4

Published

Specialized Vue.js performance monitoring agent - Component lifecycle tracking, Vuex state management profiling, route performance analysis, and reactive data monitoring with Vue DevTools integration.

Readme

@stacksleuth/vue-agent

StackSleuth Vue.js Agent

StackSleuth Vue.js Agent

npm version License: MIT TypeScript Node.js

🚀 What is StackSleuth Vue.js Agent?

Specialized Vue.js performance monitoring agent - Component lifecycle tracking, Vuex state management profiling, route performance analysis, and reactive data monitoring with Vue DevTools integration.

✨ Key Features

  • ⚛️ Vue Component Tracking: Lifecycle and render performance monitoring
  • 🗄️ Vuex Integration: State management performance analysis
  • 🛣️ Vue Router Profiling: Route transition and navigation tracking
  • 🔄 Reactive Data Monitoring: Vue reactivity system performance
  • 🔧 Vue DevTools Integration: Enhanced debugging capabilities
  • 📊 Component Tree Analysis: Component hierarchy performance insights
  • Composition API Support: Vue 3 Composition API monitoring
  • 🎯 Custom Directives: Track custom directive performance

📦 Installation

# npm
npm install @stacksleuth/vue-agent

# yarn
yarn add @stacksleuth/vue-agent

# pnpm
pnpm add @stacksleuth/vue-agent
yarn add @stacksleuth/vue-agent
pnpm add @stacksleuth/vue-agent

🏁 Quick Start

import { createApp } from 'vue';
import { VueAgent } from '@stacksleuth/vue-agent';
import App from './App.vue';

const app = createApp(App);

// Initialize Vue agent
const agent = new VueAgent({
  enabled: true,
  trackComponents: true,
  trackVuex: true,
  trackRouter: true
});

// Install as Vue plugin
app.use(agent);

// Start monitoring
agent.startMonitoring();

app.mount('#app');

📖 Comprehensive Examples

Vue 3 Setup

import { createApp } from 'vue';
import { VueAgent } from '@stacksleuth/vue-agent';
import App from './App.vue';

const app = createApp(App);

// Initialize Vue agent
const agent = new VueAgent({
  enabled: true,
  trackComponents: true,
  trackVuex: true,
  trackRouter: true
});

// Install as Vue plugin
app.use(agent);

// Start monitoring
agent.startMonitoring();

app.mount('#app');

Component Performance Tracking

// In your Vue component
export default {
  name: 'UserDashboard',
  async mounted() {
    const span = this.$stacksleuth.startSpan('user-dashboard-load');
    
    try {
      await this.loadUserData();
      await this.loadDashboardMetrics();
      span.setStatus('success');
    } catch (error) {
      span.setStatus('error', error.message);
    } finally {
      span.end();
    }
  },
  methods: {
    async loadUserData() {
      // Track specific operations
      this.$stacksleuth.recordMetric('dashboard.user_data_loaded', 1);
    }
  }
}

🎯 Real-World Usage

Production Configuration

const agent = new VueAgent({
  enabled: process.env.NODE_ENV === 'production',
  projectId: process.env.STACKSLEUTH_PROJECT_ID,
  apiKey: process.env.STACKSLEUTH_API_KEY,
  sampleRate: process.env.NODE_ENV === 'production' ? 0.01 : 0.1,
  bufferSize: 1000,
  flushInterval: 10000
});

Monitoring Best Practices

  • Sampling Rate: Use lower sampling rates (1-5%) in production
  • Buffer Management: Configure appropriate buffer sizes for your traffic
  • Error Handling: Always include error context in your monitoring
  • Security: Never log sensitive data like passwords or API keys
  • Performance: Monitor the monitoring - track agent overhead

🛠️ Troubleshooting

Common Issues

Agent Not Starting

// Enable debug mode
const agent = new VueAgent({
  enabled: true,
  debug: true
});

High Memory Usage

// Optimize memory usage
const agent = new VueAgent({
  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.


WebsiteDocumentationNPM RegistryGitHub

Made with ⚡ by StackSleuth