Skip to Content
New release 11.5 available 🎉
LicensingReporting

Reporting

Babel Licensing provides a comprehensive reporting framework that enables you to collect, analyze, and monitor critical information about your licensed applications. Through automated reporting capabilities, you gain valuable insights into application health, license usage patterns, security events, and custom business metrics.

Why Reporting Matters

Reporting is essential for understanding how your software is being used in production environments:

  • Proactive Issue Resolution: Identify and address application crashes before they impact user experience
  • License Compliance: Monitor feature usage and validate that licenses are being used as intended
  • Security Monitoring: Detect and respond to potential security threats or unauthorized access attempts
  • Usage Analytics: Make data-driven decisions about feature development and licensing strategy
  • Customer Support: Access detailed diagnostic information to resolve customer issues quickly

Report Types

Babel Licensing offers three types of reports, each designed for specific monitoring and analysis needs:

Exception Reports

Exception Reports capture detailed information about application crashes and errors, providing the context needed to reproduce and fix bugs efficiently.

Key Capabilities:

  • Automatic exception capture with full stack traces
  • Environment information (loaded assemblies, processes, environment variables)
  • System information (hardware, OS, network configuration)
  • Custom properties for additional context
  • Configurable data collection to minimize report size

Common Use Cases:

  • Production crash monitoring and analysis
  • Bug reproduction and debugging
  • Quality assurance and testing
  • Customer support diagnostics

License Reports

License Reports provide detailed insights into how license components are accessed and used within your applications.

Key Capabilities:

  • Automatic tracking of feature, field, and restriction access
  • Usage statistics (access counts, timestamps, duration)
  • License metadata and validation status
  • Smart server-side merging for historical analysis
  • Configurable tracking scope

Common Use Cases:

  • Feature adoption analysis
  • License compliance monitoring
  • Identifying unused features
  • Usage pattern tracking
  • Data-driven licensing strategy

Custom Reports

Custom Reports enable you to send any structured data to your Babel Licensing Service, tailored to your application’s specific needs.

Key Capabilities:

  • Flexible report structure using base Report class
  • Support for any custom properties and data
  • Environment and system information integration
  • Report encryption for sensitive data
  • Event-based customization before sending

Common Use Cases:

  • Security event reporting (hack detection, intrusion attempts)
  • Application performance metrics
  • Business event tracking
  • Custom diagnostic data
  • Audit trail creation

How Reporting Works

The Babel Licensing reporting system follows a simple but powerful workflow:

  1. Enable Tracking (for License Reports): Activate usage tracking before validating licenses
  2. Use Your Application: Normal application usage automatically collects data
  3. Create Report: Build a report instance with the data you want to send
  4. Customize: Add custom properties or modify report content via events
  5. Send Report: Transmit the report to your Babel Licensing Service
  6. Analyze: View and analyze reports through the service API or management interface

Reporting Architecture

The reporting framework is built on several key components:

Client-Side Components

  • Report Classes: Base classes for exception, license, and custom reports
  • BabelReporting Service: Client library for sending reports to the server
  • Usage Tracking: Automatic license component access monitoring
  • Data Collectors: Specialized collectors for environment and system information

Server-Side Processing

  • Report Validation: Ensures reports are properly formatted and authorized
  • Decryption: Handles encrypted report content
  • Report Parsing: Extracts properties for indexing and searching
  • Smart Merging: Combines license reports for comprehensive historical analysis
  • Webhook Integration: Dispatches events for external system integration

Configuration and Customization

All report types support extensive configuration to balance data richness with privacy and performance:

Data Collection Options

Control exactly what information gets included in reports:

reporting.Configuration.ExceptionReportOptions = new ExceptionReportOptions { CollectApplicationInformation = true, CollectEnvironmentVariables = false, // Privacy-sensitive CollectSystemInformation = true, CollectProcessorInformation = true, CollectMemoryInformation = true };

Report Encryption

Protect sensitive data during transmission:

reporting.Configuration.EncryptionKey = "your-secret-key";

Custom Properties

Add application-specific context to any report:

reporting.BeforeSendReport += (s, e) => { e.Report.Properties.Add("environment", "production"); e.Report.Properties.Add("deployment_id", deploymentId); e.Report.Properties.Add("user_tier", "enterprise"); };

Error Handling

Gracefully handle reporting failures:

reporting.AfterSendReport += (s, e) => { if (e.Error != null) { Logger.Error($"Failed to send report: {e.Error.Message}"); StoreForRetry(e.Report); } };

Getting Started with Reporting

1. Initialize the Reporting Service

using Babel.Licensing.Services; var reporting = new BabelReporting(); reporting.Configuration.ServiceUrl = "https://licensing.example.com"; reporting.Configuration.ClientId = "MyApplication v1.0";

2. Send Exception Reports

try { // Your application code } catch (Exception ex) { await reporting.SendExceptionReportAsync(userKey, ex); }

3. Enable License Tracking

using Babel.Licensing.Reports; // Enable before validation LicenseUsageTracking.Enable(); // Validate license var license = licenseManager.Validate(userKey, keyType); // Use licensed features (automatically tracked) var data = license.Features["Reporting"].Data; // Send tracking report await reporting.SendLicenseReportAsync(userKey);

4. Create Custom Reports

public class SecurityEventReport : Report { public string EventType { get; set; } public string Severity { get; set; } public SecurityEventReport() : base("SecurityEvent") { } public override void Build() { Properties.Add("event_type", EventType); Properties.Add("severity", Severity); base.Build(); } } // Send custom report var report = new SecurityEventReport { EventType = "UnauthorizedAccess", Severity = "High" }; await reporting.SendAsync(userKey, report);

Best Practices

Minimize Data Collection

Only collect data you actually need to reduce report size and protect privacy:

reporting.Configuration.ExceptionReportOptions = new ExceptionReportOptions { CollectSystemInformation = true, // Essential CollectDisplayInformation = false, // Usually not needed CollectProcessInformation = false // Privacy-sensitive };

Send Reports Periodically

For license reports, send at regular intervals rather than continuously:

var timer = new Timer(async _ => { await reporting.SendLicenseReportAsync(userKey); LicenseUsageTracking.Clear(); // Reset for next period }, null, TimeSpan.FromHours(24), TimeSpan.FromHours(24));

Handle Offline Scenarios

Store reports locally when the server is unreachable:

var result = await reporting.SendLicenseReportAsync(userKey); if (!result.Success) { SaveReportForLater(result.Report); }

Sanitize Sensitive Data

Never include passwords, API keys, or personally identifiable information:

reporting.BeforeSendReport += (s, e) => { // Remove or hash sensitive data e.Report.Properties["username"] = HashUsername(username); // Don't include passwords, credit cards, etc. };

Use Encryption for Sensitive Reports

Enable encryption for reports containing sensitive information:

reporting.Configuration.EncryptionKey = Configuration["Reporting:EncryptionKey"];

Report Analysis and Monitoring

Once reports reach your Babel Licensing Service, you can:

  • Query Reports: Search and filter reports through the service API
  • View Details: Examine complete report content and metadata
  • Track Trends: Monitor changes in crash rates, usage patterns, or security events
  • Export Data: Extract report data for analysis in external tools
  • Set Alerts: Configure webhooks to notify external systems of critical events

Integration with Licensing Modes

Reporting works seamlessly with all Babel Licensing modes:

User keys generated through activation or floating license workflows serve as authorization credentials for sending reports.

Performance Considerations

The reporting system is designed for minimal performance impact:

  • Asynchronous Operations: All report sending is non-blocking
  • Configurable Collection: Disable expensive collectors you don’t need
  • Efficient Tracking: Usage tracking uses observer pattern with minimal overhead
  • Smart Caching: Environment and system data is cached to avoid repeated collection
  • Compression: Reports are compressed during transmission

Documentation Structure

This section provides detailed documentation for each report type:

Each page includes practical examples, configuration options, best practices, and real-world use cases to help you implement effective reporting in your applications.

Last updated on