telemetra.monitoring
1.0.0
dotnet add package telemetra.monitoring --version 1.0.0
NuGet\Install-Package telemetra.monitoring -Version 1.0.0
<PackageReference Include="telemetra.monitoring" Version="1.0.0" />
<PackageVersion Include="telemetra.monitoring" Version="1.0.0" />
<PackageReference Include="telemetra.monitoring" />
paket add telemetra.monitoring --version 1.0.0
#r "nuget: telemetra.monitoring, 1.0.0"
#:package telemetra.monitoring@1.0.0
#addin nuget:?package=telemetra.monitoring&version=1.0.0
#tool nuget:?package=telemetra.monitoring&version=1.0.0
Telemetra Monitoring SDK
Overview
Telemetra Monitoring SDK provides a unified, extensible, and production-ready observability solution for .NET applications. It enables seamless collection and export of traces, metrics, and logs to multiple backends (OTLP, Jaeger, Grafana, Sentry, Tempo, Alloy, Console, Prometheus, Zipkin) with advanced configuration, business insights, and enterprise features.
Features
- Unified Telemetry: Tracing, metrics, and logging in one SDK
- Multi-backend Support: OTLP (gRPC/HTTP), Jaeger, Grafana, Sentry, Tempo, Alloy, Console, Prometheus, Zipkin
- Business Metrics: Custom business and system metrics (import operations, API, DB, orchestration, etc.)
- Structured Logging: Business event templates and structured log output
- Advanced Tracing: Custom spans, attributes, and distributed tracing
- Resilience: Multiple endpoints, priority routing, timeouts, and fallback
- Plug-and-play: Easy integration with .NET, Azure Functions, and microservices
- Extensible: Add your own exporters, metrics, and log templates
Getting Started
1. Install the NuGet Package
# Coming soon: Replace with actual NuGet package name
Install-Package Telemetra.Monitoring
2. Add Configuration
Add a appsettings.Telemetra.json file (or use your main appsettings) with the following structure:
{
"TelemetraMonitoring": {
"OpenTelemetry": {
"Enabled": true,
"ServiceName": "YourAppName",
"ServiceVersion": "1.0.0",
"Environment": "production",
"ActivitySources": ["YourAppName"],
"Meters": ["YourAppName"],
"Endpoints": [
{ "Name": "Console", "Enabled": true, "ConsoleOutput": true },
{ "Name": "Primary", "Enabled": true, "GrpcEndpoint": "https://your-otlp-endpoint:4317" }
]
},
"CustomMetrics": {
"Enabled": true,
"BusinessMetrics": { ... },
"SystemMetrics": { ... }
},
"StructuredLogging": { ... }
}
}
3. Register Telemetra in Program.cs
services.AddTelemetraMonitoring(config.GetSection("TelemetraMonitoring"));
Usage
Tracing
- Automatic instrumentation for HTTP, SQL, and custom sources
- Add custom spans and attributes as needed
Metrics
- Built-in and custom business metrics (import operations, API, DB, etc.)
- Use the
BusinessMetricsServiceto record custom metrics
Logging
- Structured logging with business event templates
- Logs exported to OTLP, Console, and other backends
Example: Record a Business Metric
public class ImportDataHttpTrigger
{
private readonly BusinessMetricsService _metricsService;
public async Task Run(...)
{
_metricsService.RecordImportOperation("tenantId", "orders", "success", 1234);
}
}
Supported Exporters
- OTLP (gRPC/HTTP)
- Jaeger
- Grafana Tempo
- Alloy
- Sentry
- Prometheus
- Zipkin
- Console
Advanced Features
- Multiple endpoints with priority and fallback
- Custom business metrics and structured logging
- Enterprise-grade resilience and extensibility
Documentation
- See the BusinessInsightsImplementationGuide.md for advanced usage and dashboard templates.
- See the MonitoringInsightsGuide.md for implementation details.
License
MIT License
Contributing
Contributions are welcome! Please open issues or pull requests for improvements, bug fixes, or new features.
Authors
- Stephen Oyetoro & Contributors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- AutoMapper (>= 12.0.1)
- AutoMapper.Extensions.Microsoft.DependencyInjection (>= 12.0.1)
- FluentValidation (>= 11.9.0)
- FluentValidation.DependencyInjectionExtensions (>= 11.9.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 9.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- OpenTelemetry (>= 1.12.0)
- OpenTelemetry.Api (>= 1.12.0)
- OpenTelemetry.Exporter.Console (>= 1.12.0)
- OpenTelemetry.Exporter.Geneva (>= 1.13.0-alpha.1)
- OpenTelemetry.Exporter.InfluxDB (>= 1.0.0-alpha.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.12.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Exporter.Zipkin (>= 1.12.0)
- OpenTelemetry.Extensions.Hosting (>= 1.12.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.12.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.12.0-beta.2)
- OpenTelemetry.Instrumentation.GrpcNetClient (>= 1.12.0-beta.1)
- OpenTelemetry.Instrumentation.Http (>= 1.12.0)
- OpenTelemetry.Instrumentation.Quartz (>= 1.12.0-beta.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.7.0)
- OpenTelemetry.Instrumentation.SqlClient (>= 1.8.0-beta.1)
- Polly (>= 8.2.1)
- Polly.Extensions.Http (>= 3.0.0)
- Serilog (>= 3.1.1)
- Serilog.Extensions.Logging (>= 8.0.0)
- Serilog.Sinks.Console (>= 5.0.1)
- Serilog.Sinks.Elasticsearch (>= 9.0.3)
- Serilog.Sinks.File (>= 5.0.0)
- Serilog.Sinks.Seq (>= 6.0.0)
- System.Text.Json (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 176 | 7/8/2025 |