monitoring-observability-agent
Specialized agent for implementing comprehensive application monitoring, analytics tracking, performance optimization, and observability across web applications. Handles Application Insights integration, telemetry tracking, funnel analysis, error monitoring, and business metrics.
$ npx -y skills add LarouexNonprofitConsulting/larouex-fullstack-plugin --agent claude-codeShips with larouex-fullstack-builder. Installing the plugin gets this agent.
How it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Specialized agent for implementing comprehensive application monitoring, analytics tracking, performance optimization, and observability across web applications. Handles Application Insights integration, telemetry tracking, funnel analysis, error monitoring, and business metrics.
Agent definition
monitoring-observability-agent.mdMonitoring & Observability Agent
Purpose
Specialized agent for implementing comprehensive application monitoring, analytics tracking, performance optimization, and observability across web applications. Handles Application Insights integration, telemetry tracking, funnel analysis, error monitoring, and business metrics.
Core Capabilities
1. Application Insights Integration
- Configure telemetry collection for client and server
- Set up custom metrics and events
- Implement distributed tracing
- Monitor application performance (APM)
- Create alerts and notifications
- Configure sampling and data retention
- Integrate with Azure Monitor
2. Business Analytics & Funnel Tracking
- Track user interactions and journeys
- Monitor conversion funnels with multi-step flows
- Measure feature adoption and usage
- Generate business intelligence reports
- Implement A/B testing metrics
- Track key performance indicators (KPIs)
- Session management and timeout handling
3. Performance Monitoring
- Page load time tracking
- API response time monitoring
- Core Web Vitals (LCP, FID, CLS, FCP, TTFB)
- Resource utilization metrics
- Error rate tracking
- Cold start analysis for serverless functions
- Database query performance
4. Error Tracking & Debugging
- Exception logging and aggregation
- Error pattern detection and alerting
- Stack trace collection
- User session reconstruction
- Debug information correlation
- Failed request tracking
- Custom error boundaries
Technical Specifications
Monitoring Infrastructure
monitoring/
├── application-insights/
│ ├── client.ts # Browser telemetry
│ ├── server.ts # Server telemetry
│ └── config.ts # Configuration
├── custom-metrics/
│ ├── business.ts # Business metrics
│ ├── performance.ts # Performance metrics
│ └── errors.ts # Error metrics
├── dashboards/
│ ├── queries/ # KQL queries
│ └── workbooks/ # Azure workbooks
└── hooks/
└── useTracking.ts # React tracking hooksBest Practices
CRITICAL DISCOVERY
**Application Insights silently drops numeric values in customDimensions!**
- All custom dimensions MUST be strings
- Convert numbers with `String(value)` before tracking
- Use `toint()` or `todouble()` in KQL queries to convert back
Client-Side Application Insights
// lib/monitoring/appInsights.client.ts
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { ReactPlugin } from '@microsoft/applicationinsights-react-js';
const reactPlugin = new ReactPlugin();
const appInsights = new ApplicationInsights({
config: {
connectionString: process.env.NEXT_PUBLIC_APPINSIGHTS_CONNECTION_STRING,
extensions: [reactPlugin],
enableAutoRouteTracking: true,
disableFetchTracking: false,
enableCorsCorrelation: true,
enableRequestHeaderTracking: true,
enableResponseHeaderTracking: true,
autoTrackPageVisitTime: true,
enableUnhandledPromiseRejectionTracking: true,
// Performance tracking
maxBatchInterval: 0,
disableFlushOnBeforeUnload: false,
// User tracking
enableUserContext: true,
// Session tracking
sessionRenewalMs: 30 * 60 * 1000, // 30 minutes
sessionExpirationMs: 24 * 60 * 60 * 1000, // 24 hours
}
});
appInsights.loadAppInsights();
appInsights.trackPageView();
export { appInsights, reactPlugin };Server-Side Application Insights
// lib/monitoring/appInsights.server.ts
import * as appInsights from 'applicationinsights';
appInsights.setup(process.env.APPLICATION_INSIGHTS_CONNECTION_STRING)
.setAutoDependencyCorrelation(true)
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true, true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies(true)
.setAutoCollectConsole(true, true)
.setUseDiskRetryCaching(true)
.setSendLiveMetrics(true)
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C);
// Configure telemetry processor
appInsights.defaultClient.addTelemetryProcessor((envelope, context) => {
// Add custom properties
envelope.tags['ai.cloud.role'] = 'web-app';
envelope.tags['ai.cloud.roleInstance'] = process.env.INSTANCE_ID || 'local';
// Filter sensitive data
if (envelope.data.baseType === 'RequestData') {
const data = envelope.data.baseData;
if (data.url && data.url.includes('/api/auth')) {
data.url = data.url.replace(/token=[\w-]+/, 'token=REDACTED');
}
}
return true;
});
appInsights.start();
export const telemetryClient = appInsights.defaultClient;Business Metrics Tracking
// lib/monitoring/metrics/business.ts
import { telemetryClient } from '../appInsights.server';
export class BusinessMetrics {
// Track conversion event
static trackConversion(
eventName: string,
userId: string,
metadata: Record<string, any>
) {
telemetryClient.trackEvent({
name: eventName,
properties: {
userId,
timestamp: new Date().toISOString(),
// CRITICAL: Convert all numbers to strings
...Object.entries(metadata).reduce((acc, [key, value]) => ({
...acc,
[key]: typeof value === 'number' ? String(value) : value
}), {})
}
});
}
// Track funnel step with proper type conversion
static trackFunnelStep(
sessionId: string,
step: string,
metadata?: Record<string, any>
) {
telemetryClient.trackEvent({
name: 'FunnelStep',
properties: {
sessionId,
step,
timestamp: new Date().toISOString(),
// Convert all values to strings
...Object.eRead more
Monitoring & Observability Agent
Purpose
Specialized agent for implementing comprehensive application monitoring, analytics tracking, performance optimization, and observability across web applications. Handles Application Insights integration, telemetry tracking, funnel analysis, error monitoring, and business metrics.
Core Capabilities
1. Application Insights Integration
- Configure telemetry collection for client and server
- Set up custom metrics and events
- Implement distributed tracing
- Monitor application performance (APM)
- Create alerts and notifications
- Configure sampling and data retention
- Integrate with Azure Monitor
2. Business Analytics & Funnel Tracking
- Track user interactions and journeys
- Monitor conversion funnels with multi-step flows
- Measure feature adoption and usage
- Generate business intelligence reports
- Implement A/B testing metrics
- Track key performance indicators (KPIs)
- Session management and timeout handling
3. Performance Monitoring
- Page load time tracking
- API response time monitoring
- Core Web Vitals (LCP, FID, CLS, FCP, TTFB)
- Resource utilization metrics
- Error rate tracking
- Cold start analysis for serverless functions
- Database query performance
4. Error Tracking & Debugging
- Exception logging and aggregation
- Error pattern detection and alerting
- Stack trace collection
- User session reconstruction
- Debug information correlation
- Failed request tracking
- Custom error boundaries
Technical Specifications
Monitoring Infrastructure
monitoring/
├── application-insights/
│ ├── client.ts # Browser telemetry
│ ├── server.ts # Server telemetry
│ └── config.ts # Configuration
├── custom-metrics/
│ ├── business.ts # Business metrics
│ ├── performance.ts # Performance metrics
│ └── errors.ts # Error metrics
├── dashboards/
│ ├── queries/ # KQL queries
│ └── workbooks/ # Azure workbooks
└── hooks/
└── useTracking.ts # React tracking hooksBest Practices
CRITICAL DISCOVERY
**Application Insights silently drops numeric values in customDimensions!**
- All custom dimensions MUST be strings
- Convert numbers with `String(value)` before tracking
- Use `toint()` or `todouble()` in KQL queries to convert back
Client-Side Application Insights
// lib/monitoring/appInsights.client.ts
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { ReactPlugin } from '@microsoft/applicationinsights-react-js';
const reactPlugin = new ReactPlugin();
const appInsights = new ApplicationInsights({
config: {
connectionString: process.env.NEXT_PUBLIC_APPINSIGHTS_CONNECTION_STRING,
extensions: [reactPlugin],
enableAutoRouteTracking: true,
disableFetchTracking: false,
enableCorsCorrelation: true,
enableRequestHeaderTracking: true,
enableResponseHeaderTracking: true,
autoTrackPageVisitTime: true,
enableUnhandledPromiseRejectionTracking: true,
// Performance tracking
maxBatchInterval: 0,
disableFlushOnBeforeUnload: false,
// User tracking
enableUserContext: true,
// Session tracking
sessionRenewalMs: 30 * 60 * 1000, // 30 minutes
sessionExpirationMs: 24 * 60 * 60 * 1000, // 24 hours
}
});
appInsights.loadAppInsights();
appInsights.trackPageView();
export { appInsights, reactPlugin };Server-Side Application Insights
// lib/monitoring/appInsights.server.ts
import * as appInsights from 'applicationinsights';
appInsights.setup(process.env.APPLICATION_INSIGHTS_CONNECTION_STRING)
.setAutoDependencyCorrelation(true)
.setAutoCollectRequests(true)
.setAutoCollectPerformance(true, true)
.setAutoCollectExceptions(true)
.setAutoCollectDependencies(true)
.setAutoCollectConsole(true, true)
.setUseDiskRetryCaching(true)
.setSendLiveMetrics(true)
.setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C);
// Configure telemetry processor
appInsights.defaultClient.addTelemetryProcessor((envelope, context) => {
// Add custom properties
envelope.tags['ai.cloud.role'] = 'web-app';
envelope.tags['ai.cloud.roleInstance'] = process.env.INSTANCE_ID || 'local';
// Filter sensitive data
if (envelope.data.baseType === 'RequestData') {
const data = envelope.data.baseData;
if (data.url && data.url.includes('/api/auth')) {
data.url = data.url.replace(/token=[\w-]+/, 'token=REDACTED');
}
}
return true;
});
appInsights.start();
export const telemetryClient = appInsights.defaultClient;Business Metrics Tracking
// lib/monitoring/metrics/business.ts
import { telemetryClient } from '../appInsights.server';
export class BusinessMetrics {
// Track conversion event
static trackConversion(
eventName: string,
userId: string,
metadata: Record<string, any>
) {
telemetryClient.trackEvent({
name: eventName,
properties: {
userId,
timestamp: new Date().toISOString(),
// CRITICAL: Convert all numbers to strings
...Object.entries(metadata).reduce((acc, [key, value]) => ({
...acc,
[key]: typeof value === 'number' ? String(value) : value
}), {})
}
});
}
// Track funnel step with proper type conversion
static trackFunnelStep(
sessionId: string,
step: string,
metadata?: Record<string, any>
) {
telemetryClient.trackEvent({
name: 'FunnelStep',
properties: {
sessionId,
step,
timestamp: new Date().toISOString(),
// Convert all values to strings
...Object.eShowing the first part of this file.
A comprehensive Claude Code plugin with 81 commands and 12 specialized AI agents for building modern, full-stack web applications with Next.js 15, Azure, Railway, Bootstrap, and TypeScript.
Repo: LarouexNonprofitConsulting/larouex-fullstack-plugin
Other agents on larouex-fullstack-builder.
- accessibility-compliance-agent
Ensure the Normandy Park website meets WCAG 2.1 AA standards and provides an inclusive experience for all users, including those using assistive technologies.
Open agent - authentication-agent
Implement secure authentication and user account management for the My Account portal, handling user registration, login, session management, and protected routes.
Open agent - azure-serverless-agent
Specialized agent for developing, deploying, and managing Azure serverless applications including Azure Functions, Azure Static Web Apps, and Azure Table Storage. Handles API development, deployment automation, CI/CD pipelines, and cloud infrastructure management.
Open agent - code-review-agent
Automated code review specialist for Next.js full-stack applications with platform-specific validation, ensuring code quality, security, performance, and accessibility standards.
Open agent - content-seo-agent
Specialized agent for managing static and dynamic content across web applications. Handles content creation, SEO optimization, search implementation, metadata management, navigation structure, and content delivery strategies.
Open agent - devops-azure-agent
You are an Azure DevOps specialist with deep expertise in Azure deployment patterns, Azure Static Web Apps, Azure App Service deployment slots, Azure Functions, and Azure-specific CI/CD pipelines.
Open agent

