Open Telemetry

OpenTelemetry offers distributed tracing, metrics, and logging, enabling you to monitor and analyze your application’s performance.

If Binacle.Net is part of your system, you can push telemetry data to popular platforms like Grafana, Jaeger, Prometheus, and Azure Application Insights for real-time observability.

πŸ› οΈ Configuration

OpenTelemetry is configured via the OpenTelemetry.json file.

Below is the default configuration:

{
  "OpenTelemetry": {
    "ServiceNamespace": "binacle",
    "ServiceInstanceId": "1",
    "AdditionalAttributes": {
      
    },
    "Otlp": {
      "Enabled": false,
      "Endpoint": null,
      "Protocol": "grpc"
    },
    "AzureMonitor": {
      "Enabled": false,
      "ConnectionString": null,
      "EnableLiveMetrics": false,
      "SamplingRatio": 1
    },
    "Metrics": {
      "AdditionalMeters": [

      ],
      "AdditionalAttributes": {
        
      }
    },
    "Tracing": {
      "AdditionalSources": [

      ],
      "AdditionalAttributes": {
        
      }
    },
    "Logging": {
      "AdditionalAttributes": {
        
      }
    }
  }
}

You can modify OpenTelemetry configuration using Production Overrides by creating an OpenTelemetry.Production.json file, or by using Environment Variables.

For more information on overriding configurations, refer to the Configuration Basics page.

πŸ”§ Configuration Options

🌍 General Settings

🌐 OTLP (OpenTelemetry Protocol) Exporter

The OTLP Exporter is the recommended way to send OpenTelemetry data.

It allows you to export traces, metrics, and logs to platforms like Grafana, Jaeger, Tempo, Prometheus, and more.

The recommended way to configure the OTLP exporter is via the officially supported environment variables.

For a full list of available variables, check the OpenTelemetry .NET OTLP Exporter Docs.

☁️ Azure Monitor Exporter

The Azure Monitor Exporter sends telemetry to Azure Application Insights for monitoring and live diagnostics.

πŸ”Ή Azure Monitor Exporter requires an Application Insights resource. You can retrieve your connection string from the Azure Portal under the β€œInstrumentation Key” section of your Application Insights instance.