Configuration: Diagnostics Module - ChrisMavrommatis/Binacle.Net GitHub Wiki

The Diagnostics Module provides essential diagnostic features such as logging, health checks, and telemetry. This module is always active and cannot be deactivated; however, only the logging feature is enabled by default. The other features—health checks and telemetry—require explicit opt-in to be activated.

Features

  • Logging: Enabled by default, this feature provides crucial insights into system operations.
  • Health Checks: Allows you to monitor the overall health of your services and components.
  • Telemetry: Enables detailed tracking and metrics for performance monitoring.

Configuration

All configuration files for the Diagnostics Module are located in /app/Config_Files/DiagnosticsModule. Below is the structure:

app
└── Config_Files
    └── DiagnosticsModule
        ├── ConnectionStrings.json
        ├── HeathChecks.json
        └── Serilog.json

Logging

Binacle.Net uses Serilog to provide robust logging capabilities. Serilog is a widely-used library known for its flexibility and customization options.

For more detailed information please refer to the dedicated Logging page.

Health Checks

The Health Checks feature in the Diagnostics Module provides essential monitoring capabilities for Binacle.Net. By enabling health checks, you can easily integrate your monitoring tools, allowing for proactive alerts and efficient traffic management through load balancers.

For detailed configuration options and examples, refer to the dedicated Health Checks page.

Telemetry

The Telemetry feature in the Diagnostics Module enhances the monitoring capabilities of Binacle.Net by providing real-time insights into application performance and usage metrics. By enabling telemetry, you can capture critical data about API requests, response times, and system health, which can be invaluable for diagnosing issues and optimizing performance.

For more detailed information and configuration options, please refer to the dedicated Telemetry page.

Cloud Providers

The Diagnostics Module can integrate with cloud providers to enhance various features of the module.

Azure Application Insights

Azure Application Insights enhances both Logging and Telemetry within the Diagnostics Module. To enable this integration, set the ApplicationInsights connection string in the ConnectionStrings.json file, or use the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable.

{
  "ConnectionStrings": {
    "ApplicationIngights": "your_connection_string_here"
  }
}

[!Warning]

Environment variables for connection strings do not take precedence over the configuration file. Instead, they act as fallback values if the configuration file does not provide them.

For more details on how each feature integrates with cloud services, refer to the respective sections on Logging, Health Checks, and Telemetry.