CxO.Statistics 0.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CxO.Statistics --version 0.4.0
                    
NuGet\Install-Package CxO.Statistics -Version 0.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CxO.Statistics" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CxO.Statistics" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="CxO.Statistics" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CxO.Statistics --version 0.4.0
                    
#r "nuget: CxO.Statistics, 0.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CxO.Statistics@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CxO.Statistics&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=CxO.Statistics&version=0.4.0
                    
Install as a Cake Tool

CxO.Statistics

NuGet Target frameworks

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",
  "DefaultCxoInstance": "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). From/To are optional: an omitted window defaults to the last CxoStatisticsOptions.DefaultTimeWindow (24 h) ending now — dashboard-like behaviour for every consumer.

Note: OrderStatistics.InProgress reads the cxo_orders_in_progress gauge emitted by SOM/ROM (CxODEV-1632); on deployments running older SOM/ROM images it stays empty.

Docs

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.5.0 314 7/19/2026
0.4.1 159 7/13/2026
0.4.0 157 7/9/2026
0.3.0 136 7/8/2026
0.2.0 142 7/8/2026
0.1.0 143 7/7/2026