Everything you need to integrate Sentinel into your C# applications
Get up and running with Sentinel in 5 minutes. Add monitoring to your C# application with just 2 lines of code.
Add the Sentinel Client library to your project:
nd dn add package Noundry.Sentinel.Client
Add configuration to your appsettings.json:
{
"NoundrySentinel": {
"Enabled": true,
"ApiKey": "your-api-key-here",
"TenantHost": "tenant.ingest.sentinel.noundry.com",
"CollectionIntervalSeconds": 15
}
}
Add one line to your Program.cs:
using Noundry.Sentinel.Client;
var builder = WebApplication.CreateBuilder(args);
// Add Sentinel monitoring
builder.Services.AddNoundrySentinel(builder.Configuration);
var app = builder.Build();
app.Run();
✓ Done! Your application now sends performance metrics automatically.
Multiple ways to install the Sentinel Client library.
nd dn add package Noundry.Sentinel.Client
Install-Package Noundry.Sentinel.Client
<ItemGroup>
<PackageReference Include="Noundry.Sentinel.Client" Version="1.0.0" />
</ItemGroup>
Requirements: C# 12 or later, Microsoft.Extensions.Hosting (included in web apps)
Configure Sentinel using appsettings.json or code.
| Property | Type | Default | Description |
|---|---|---|---|
| Enabled | bool | true | Enable/disable monitoring |
| ApiKey | string | - | Required. Your tenant API key |
| TenantHost | string | - | Required. Ingestion API hostname |
| UseHttps | bool | true | Use HTTPS for API calls |
| CollectionIntervalSeconds | int | 15 | Metric collection interval |
| BatchSize | int | 100 | Max metrics per batch |
| QueueCapacity | int | 10000 | Max queued metrics |
| CircuitBreakerFailureThreshold | int | 3 | Failures before opening circuit |
| CircuitBreakerResetSeconds | int | 60 | Seconds before retry |
| TimeoutSeconds | int | 10 | HTTP request timeout |
Use different settings for Development, Staging, and Production:
{
"NoundrySentinel": {
"Enabled": true,
"ApiKey": "${SENTINEL_API_KEY}",
"TenantHost": "yourcompany.ingest.sentinel.noundry.com",
"CollectionIntervalSeconds": 30
}
}
⚠️ Use environment variables for secrets in production. Never commit API keys to source control.
Integrate Sentinel into your C# web applications.
using Noundry.Sentinel.Client;
var builder = WebApplication.CreateBuilder(args);
// Add services
builder.Services.AddControllers();
builder.Services.AddNoundrySentinel(builder.Configuration);
var app = builder.Build();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
Monitor background services and console applications.
using Microsoft.Extensions.Hosting;
using Noundry.Sentinel.Client;
var builder = Host.CreateDefaultBuilder(args)
.ConfigureServices((context, services) =>
{
// Add Sentinel monitoring
services.AddNoundrySentinel(context.Configuration);
// Add your worker
services.AddHostedService<Worker>();
});
var host = builder.Build();
await host.RunAsync();
Sentinel automatically collects comprehensive performance metrics from your C# applications.
Fine-tune Sentinel for specific requirements.
For scenarios requiring sub-second granularity:
{
"CollectionIntervalSeconds": 5,
"BatchSize": 50,
"QueueCapacity": 5000
}
⚠️ Higher overhead, more network traffic, faster quota consumption
For resource-constrained environments:
{
"CollectionIntervalSeconds": 60,
"BatchSize": 200,
"QueueCapacity": 2000
}
✓ Lower overhead, less granular data
Sentinel includes a circuit breaker pattern to prevent cascading failures when the ingestion API is unavailable.
{
"CircuitBreakerFailureThreshold": 5,
"CircuitBreakerResetSeconds": 300,
"TimeoutSeconds": 15
}
✓ Your application continues running normally even when the ingestion API is down. Metrics are queued and sent when the circuit closes.
Common issues and solutions.
1. Check if Sentinel is enabled: "Enabled": true
2. Verify API key is correct and tenant is active
3. Check application logs for Sentinel startup messages
4. Ensure TenantHost is reachable from your application
1. Verify ingestion API is accessible: curl https://tenant.ingest.sentinel.noundry.com/health
2. Check firewall rules and network connectivity
3. Increase timeout for slow networks
4. Reduce failure threshold temporarily for troubleshooting
1. Reduce queue capacity: "QueueCapacity": 5000
2. Increase collection interval to reduce metric volume
3. Verify circuit breaker is working (prevents unbounded queuing)
1. Reduce collection frequency: "CollectionIntervalSeconds": 60
2. Check your current quota usage in the dashboard
3. Consider upgrading your plan
The Sentinel Client automatically sends metrics to the Ingestion API. This reference is for advanced users.
https://{tenant}.ingest.sentinel.noundry.com
Ingests a batch of metrics (handled automatically by the client).
X-Api-Key: your-api-key-here
Content-Type: application/json
Response: 202 Accepted - Batch queued for processing
Health check endpoint (no authentication required).
All API requests require authentication via API key.
Include your API key in the X-Api-Key header:
X-Api-Key: your-api-key-here