GMI · TECHNOLOGY OBSERVATORY // ALL SYSTEMS NOMINAL
ENGINEERED BY LEOPARD DATA

Logging and System Visibility

Comprehensive observability across Grade My Investments' entire ecosystem

Observability Architecture

Grade My Investments implements a comprehensive logging and monitoring strategy that provides full system visibility across all applications, services, and infrastructure components. Our multi-layered approach ensures rapid issue detection, detailed performance insights, and complete audit trails.

LOGGING PIPELINE
rendering diagram…
flowchart LR
    subgraph APPS[Source Applications]
        CW[Client Web<br/>ILogger]:::app
        AW[Admin Web<br/>ILogger]:::app
        MA[MAUI Mobile<br/>ILogger]:::app
        CS[Console Services<br/>ILogger x11]:::svc
        RG[ReportGenerator<br/>Serilog]:::svc
        AF[Azure Functions<br/>App Insights]:::ext
    end

    subgraph LEVELS[Log Levels]
        L1[CRITICAL - Fatal]:::sec
        L2[ERROR]:::sec
        L3[WARNING]:::sec
        L4[INFORMATION]:::app
        L5[DEBUG - TRACE]:::svc
    end

    subgraph STORAGE[Storage and Analysis]
        AS[App Service Logs<br/>Azure Portal]:::ext
        AI[Application Insights<br/>KQL - Dashboards]:::ext
        DB[(activitylogentries<br/>MySQL)]:::data
        VF[VM Log Files<br/>opt-gmi-logs]:::data
    end

    APPS --> LEVELS
    LEVELS --> AS
    AF --> AI
    CW --> DB
    AW --> DB
    CS --> VF
    RG --> VF

    classDef app fill:#1f2630,stroke:#C0894E,color:#F3EFE8;
    classDef svc fill:#241c14,stroke:#E2B583,color:#F3EFE8;
    classDef data fill:#22201a,stroke:#C0894E,color:#EBD3AE;
    classDef ext fill:#1b1f27,stroke:#5A616B,color:#C4C0B8;
    classDef sec fill:#1d2733,stroke:#5cc8e0,color:#eafaff;
How log events flow from source applications through the logging stack to storage and analysis.

5 Levels

Logging Hierarchy

15+ Apps

Instrumented Services

Real-time

Console + File Output

Structured

ILogger + Serilog

Logging Levels and Hierarchy

Grade My Investments employs a structured logging approach with five distinct levels, each serving specific purposes in system monitoring and debugging.

CRITICAL / FATAL

System-breaking errors requiring immediate attention

Examples: Database connection failures, payment processing errors, security breaches
ERROR

Application errors that don't crash the system but affect functionality

Examples: Failed API calls, validation errors, processing exceptions
WARNING

Potentially problematic situations that should be monitored

Examples: High memory usage, slow response times, deprecated API usage
INFORMATION

General application flow and significant business events

Examples: User logins, report generations, payment completions
DEBUG / TRACE

Detailed diagnostic information for troubleshooting

Examples: Method entry/exit, variable values, SQL queries
Daily Log Distribution
Critical/Fatal
0.1%
Error
2%
Warning
8%
Information
45%
Debug/Trace
45%

Application Logging Coverage

Every component in the Grade My Investments ecosystem implements comprehensive logging, providing complete visibility across all user interactions and system operations.

Web Applications
Client Web Application
  • User authentication events
  • Page navigation tracking
  • API request/response logging
  • Client-side error capturing
Admin Web Application
  • Administrative actions
  • User management operations
  • System configuration changes
  • Report generation requests
MAUI Mobile Application
  • Mobile-specific interactions
  • Push notification handling
  • Offline/online state changes
  • Device-specific errors
Background Services
Communication Services
  • SMS/Email delivery status
  • Queue processing metrics
  • Third-party API responses
  • Rate limiting events
Report Generation
  • Report processing stages
  • Data retrieval performance
  • Report formatting processes
  • Template processing errors
Financial Operations
  • Payment processing events
  • Subscription state changes
  • Billing calculations
  • Financial data updates

Azure Functions Logging

Azure Functions provide serverless compute logging with built-in integration to Application Insights, capturing execution metrics, performance data, and custom telemetry.

Function Logging Features:
  • Execution duration tracking
  • Memory usage monitoring
  • Cold start detection
  • Dependency tracking
  • Custom event logging
  • Exception correlation
  • Request/response payloads
  • Performance counters
Key Function Categories:
HTTP Triggered Functions
API endpoints, webhooks, and web service integrations
Timer Triggered Functions
Scheduled tasks, data synchronization, and cleanup operations
Event Triggered Functions
Message queue processing, file uploads, and real-time events
Function Configuration
Runtime .NET 10 Isolated
Hosting App Service Plan
Telemetry App Insights
Network VNet Integrated

Log Management Infrastructure

Centralized Logging Architecture

Grade My Investments employs a sophisticated logging infrastructure that aggregates, processes, and stores logs from all system components in a centralized, searchable, and highly available manner.

Collection
Structured logging from all sources
Processing
Filtering, parsing, and enrichment
Storage
Long-term retention and indexing
Analysis
Search, visualization, and alerting
Technology Stack:
  • Microsoft.Extensions.Logging (ILogger): Built-in .NET logging across all web apps and console services
  • Serilog: Structured logging with file and console sinks in ReportGeneratorAlpha
  • Application Insights: Azure Functions telemetry and request tracking
  • App Service Logs: Azure App Service built-in log streaming for web apps
Logging Coverage
Web Apps 3 (ILogger)
Console Services 11 (ILogger)
Azure Functions App Insights
ReportGeneratorAlpha Serilog
VM Log Files

Background services write logs to /opt/gmi/logs/ for direct access via SSH

Monitoring and Alerting

Performance Monitoring
  • Response time tracking
  • Throughput analysis
  • Resource utilization
  • Capacity planning
  • SLA compliance
Error Detection
  • Real-time error tracking
  • Error rate thresholds
  • Correlation analysis
  • Root cause identification
  • Automated escalation
Security Monitoring
  • Authentication anomalies
  • Suspicious access patterns
  • Data breach detection
  • Compliance violations
  • Security incident tracking
Alert Configuration Examples
Critical Alert
Error Rate > 5%
Notification:
SMS + Email + Slack
Response Time:
Immediate
Escalation:
15 minutes
Warning Alert
Response Time > 2s
Notification:
Email + Slack
Response Time:
5 minutes
Escalation:
30 minutes

Log Analysis and Reporting

Advanced Analytics Capabilities

Grade My Investments' logging infrastructure provides powerful analytics and reporting capabilities, enabling data-driven insights into system performance, user behavior, and business metrics.

Key Analytics Features:
  • Custom KQL queries
  • Interactive dashboards
  • Automated reports
  • Trend analysis
  • Performance baselines
  • Anomaly detection
  • Business intelligence
  • Predictive analytics
Regular Reports Generated:
Daily System Health Report - Performance metrics and error summaries
Weekly User Activity Report - Usage patterns and engagement metrics
Monthly Performance Baseline - Trend analysis and capacity planning
Quarterly Security Audit - Security events and compliance status
Analysis Sources
Activity Logs MySQL
App Service Logs Azure Portal
Function Telemetry App Insights
VM Logs File System
Activity Log Table

MySQL

activitylogentries table tracks user interactions across all clients