monitoring-setup
Expert in setting up Sentry error tracking and Google Analytics for NestJS and Next.js applications. Use this skill when users need monitoring, error tracking, or analytics configuration.
What this skill does
# Monitoring Setup Expert ## Overview This skill enables AI assistants to set up comprehensive monitoring for NestJS and Next.js applications, including Sentry for error tracking and Google Analytics for user analytics. ## When to Use This Skill This skill activates when users: - Need to set up error tracking (Sentry) - Want to configure Google Analytics - Need monitoring for production applications - Want to track application errors and user behavior ## Sentry Setup ### NestJS Backend 1. Install: `npm install @sentry/node @sentry/profiling-node` 2. Initialize in `main.ts` before app creation 3. Configure DSN via `SENTRY_DSN` environment variable 4. Set appropriate sample rates for production ### Next.js Frontend 1. Install: `npm install @sentry/nextjs` 2. Run: `npx @sentry/wizard@latest -i nextjs` 3. Configure client/server/edge configs 4. Set `NEXT_PUBLIC_SENTRY_DSN` for client-side ## Google Analytics Setup ### Next.js Setup 1. Add Google Analytics script to root layout 2. Use `NEXT_PUBLIC_GA_MEASUREMENT_ID` (format: G-XXXXXXXXXX) 3. Create analytics utility functions for event tracking 4. Set up page view tracking ### Common Events - User signup/login - Purchases/conversions - Feature usage - Custom business events ## Best Practices - Use different DSNs for dev/prod - Set appropriate sample rates - Respect user privacy (GDPR/CCPA) - Don't track sensitive data - Set up alerts for critical errors ## Integration This skill integrates with `/monitoring-setup` command for automated setup workflows.
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.