0.2.3 • Published 1 month ago

@stacksleuth/django-agent v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@stacksleuth/django-agent

StackSleuth Django Agent

StackSleuth Django Agent

npm version License: MIT TypeScript Node.js

🚀 What is StackSleuth Django Agent?

Advanced Django performance monitoring agent - Middleware tracking, database query optimization, template rendering analysis, session monitoring, and comprehensive view-level performance metrics.

✨ Key Features

  • 🐍 Django Middleware Tracking: Request/response middleware performance
  • 🗄️ ORM Query Optimization: Django ORM query performance analysis
  • 🎨 Template Rendering: Django template performance monitoring
  • 👤 Session Monitoring: User session performance tracking
  • 🔍 View-level Metrics: Detailed view function performance data
  • 🔄 Real-time Updates: WebSocket integration for live monitoring
  • 📊 Admin Integration: Django admin performance insights
  • Production Ready: Minimal overhead Django integration

📦 Installation

npm install @stacksleuth/django-agent
yarn add @stacksleuth/django-agent
pnpm add @stacksleuth/django-agent

🏁 Quick Start

# settings.py
INSTALLED_APPS = [
    # ... your apps
    'stacksleuth.django',
]

MIDDLEWARE = [
    'stacksleuth.django.middleware.StackSleuthMiddleware',
    # ... your middleware
]

STACKSLEUTH = {
    'ENABLED': True,
    'SAMPLE_RATE': 0.1,
    'MONITOR_DATABASE': True,
    'MONITOR_TEMPLATES': True,
}

# views.py
from stacksleuth.django import track_performance

@track_performance('user-list-view')
def user_list(request):
    users = User.objects.all()
    return JsonResponse({'users': list(users.values())})

📚 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