Skip to main content

Monitoring & Diagnostics

AuthProxy provides comprehensive monitoring capabilities through OpenTelemetry integration and built-in health endpoints.

Telemetry Integration

OpenTelemetry

AuthProxy supports OpenTelemetry for distributed tracing and metrics:

{
"UptraceDsn": "https://TOKEN@api.uptrace.dev/PROJECT_ID",
"ServiceName": "AuthProxy",
"ServiceId": 10
}

Uptrace Dashboard

When configured, Uptrace provides:

  • Request latency analysis
  • Error rate tracking
  • Dependency mapping
  • Custom metrics

Health Endpoints

System Health

GET /health

Returns overall system status including:

  • Database connectivity
  • Memory usage
  • Active sessions count

Detailed Info

GET /auth/v1/info

Returns:

  • Version information
  • Available authentication methods
  • Server configuration (non-sensitive)

Key Metrics

Performance KPIs

MetricDescriptionTarget
Latency (p50)Median response time< 50ms
Latency (p99)99th percentile< 200ms
Error RateFailed requests percentage< 0.1%
ThroughputRequests per second5000+

Authentication Metrics

MetricDescription
Login Success RateSuccessful authentications / total attempts
Session DurationAverage active session time
Key UsageAuthentication method distribution
Failed AttemptsBlocked/failed login attempts

Resource Metrics

MetricDescription
CPU UsageProcessor utilization
MemoryRAM consumption
ConnectionsActive database connections
Cache Hit RateFile cache effectiveness

Logging

Structured Logging

All logs are output in JSON format for easy parsing:

{
"timestamp": "2024-01-15T10:30:00Z",
"level": "Information",
"message": "User authenticated",
"userId": "638412345678901234",
"method": "Fido2Key",
"ip": "203.0.113.10"
}

Log Levels

LevelUsage
DebugDetailed diagnostic information
InformationNormal operational events
WarningPotential issues
ErrorFailures requiring attention
CriticalSystem-level failures

Authentication Logging

The authentication log captures user id, login method, client device details, source IP, and location enrichment. Operators normally review this data through the admin panel or connected observability stack rather than querying tables directly.

Alerting

ConditionSeverityAction
Error rate > 1%WarningInvestigate logs
Latency p99 > 500msWarningCheck resources
Failed logins spikeHighCheck for attack
Database connection failedCriticalImmediate response
Memory > 90%WarningScale or optimize

Integration Options

  • Email: SMTP notification support
  • Webhooks: Custom HTTP callbacks
  • Telegram: Bot notifications
  • Uptrace: Built-in alerting

Troubleshooting

Common Issues

High Latency

  • Check database query performance
  • Verify cache hit rates
  • Review active session count

Memory Growth

  • Monitor file cache size
  • Check for session leaks
  • Review route configuration

Authentication Failures

  • Verify key configuration
  • Check FIDO2 origin settings
  • Review rate limiting thresholds

Debug Mode

Enable detailed logging in development:

{
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Warning"
}
}
}