CxO.Statistics
0.1.0
See the version list below for details.
dotnet add package CxO.Statistics --version 0.1.0
NuGet\Install-Package CxO.Statistics -Version 0.1.0
<PackageReference Include="CxO.Statistics" Version="0.1.0" />
<PackageVersion Include="CxO.Statistics" Version="0.1.0" />
<PackageReference Include="CxO.Statistics" />
paket add CxO.Statistics --version 0.1.0
#r "nuget: CxO.Statistics, 0.1.0"
#:package CxO.Statistics@0.1.0
#addin nuget:?package=CxO.Statistics&version=0.1.0
#tool nuget:?package=CxO.Statistics&version=0.1.0
CxO.Statistics
Typed order / workflow / external-dependency statistics over the CxO monitoring stack. The package runs PromQL against a deployment's Prometheus and returns a stable, domain-typed contract — portals depend on the contract, not on Prometheus.
Design: CxODEV-1540 research.
Install
dotnet add package CxO.Statistics
Or as a PackageReference:
<PackageReference Include="CxO.Statistics" Version="0.1.*" />
Quick start
using CxO.Statistics;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCxoStatistics(builder.Configuration); // binds the "Statistics" section
var app = builder.Build();
// appsettings.json
"Statistics": {
"PrometheusBaseUrl": "http://cxo-prometheus:9090",
"DefaultInstance": "local" // null ⇒ all instances; per-query Instance overrides
}
Inject IStatisticsService anywhere:
public class StatisticsController(IStatisticsService statistics) : ControllerBase
{
[HttpGet("orders")]
public Task<OrderStatistics> GetOrders(DateTimeOffset from, DateTimeOffset to, CancellationToken ct) =>
statistics.GetOrderStatisticsAsync(new OrderStatisticsQuery { From = from, To = to }, ct);
}
The contract
| Method | Returns | Backed by |
|---|---|---|
GetOrderStatisticsAsync |
OrderStatistics — per engine domain (service-order | resource-order): received rate, in-progress, totals, outcome breakdown, P50/95/99 duration |
cxo_orders_* (meter CxO.Orders) |
GetWorkflowStatisticsAsync |
WorkflowStatistics — per workflow type: started/failed rate, running gauge, totals, execution duration |
Conductor-native workflow_* |
GetDependencyStatisticsAsync |
DependencyStatistics — per dependency: request rate, status breakdown (ok\|4xx\|5xx\|fault\|timeout\|error), duration, timeouts, health |
cxo_dependency_* (meter CxO.Dependencies) |
Every query carries From/To/Step plus optional Instance/Environment filters (mapped to the cxo_instance/environment labels).
Note: OrderStatistics.InProgress reads the cxo_orders_in_progress gauge and stays empty until that producer-side metric ships in SOM/ROM.
Docs
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Http (>= 9.0.4)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.4)
-
net8.0
- Microsoft.Extensions.Http (>= 9.0.4)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.