FluxFlow.Components.Observability 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluxFlow.Components.Observability --version 3.0.0
                    
NuGet\Install-Package FluxFlow.Components.Observability -Version 3.0.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="FluxFlow.Components.Observability" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluxFlow.Components.Observability" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluxFlow.Components.Observability" />
                    
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 FluxFlow.Components.Observability --version 3.0.0
                    
#r "nuget: FluxFlow.Components.Observability, 3.0.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 FluxFlow.Components.Observability@3.0.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=FluxFlow.Components.Observability&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluxFlow.Components.Observability&version=3.0.0
                    
Install as a Cake Tool

FluxFlow.Components.Observability

Standalone observer nodes for FluxFlow — counter, logger, and metrics. Each depends only on FluxFlow.Nodes (and FluxFlow.Mapping for the counter's optional predicate) — no engine, registry, or runtime. You new the node and LinkTo the next one.

Nodes

Node Shape Purpose
FlowCounterNode<TInput> Input → Output (FlowCounterSnapshot) Counts accepted inputs and emits counter snapshots.
FlowLoggerNode<TInput> Input → Output (FlowLogEntry) Emits structured log entries from inputs.
FlowMetricsNode<TInput> Input → Output (FlowMetricSnapshot) Emits count, rate, timestamp, and optional size snapshots.

Every message travels as a FlowMessage<T> envelope. Each node broadcasts its result on Output carrying the same correlation id as the input; failures surface on Errors (with the input's correlation id and a Code from ObservabilityErrorCodes) and diagnostics flow on Events. The package emits neutral contracts only — hosts decide whether those entries or snapshots become app logs, dashboards, files, telemetry, or test assertions.

Counter

await using var node = new FlowCounterNode<MyMessage>(
    new FlowCounterOptions { InputType = "message", Name = "received", Predicate = "value.Enabled" },
    expressionEngine);

node.Output.LinkTo(snapshotSink, new DataflowLinkOptions { PropagateCompletion = false });
await node.Input.SendAsync(FlowMessage.Create(message));

FlowCounterNode emits FlowCounterSnapshot values with count, rejected count, last observed timestamp, name, and input type. When a predicate is configured it is compiled once at construction from the supplied IFlowExpressionEngine; inputs the predicate rejects are not counted (but are tallied in RejectedCount). With no predicate every input is counted and no engine is required. Pass an IFlowMapContextFactory<TInput> to control the variables the predicate sees (defaults to input/value).

Logger

await using var node = new FlowLoggerNode<MyMessage>(
    new FlowLoggerOptions
    {
        InputType = "message",
        Level = "Information",
        Category = "workflow",
        MessageTemplate = "Observed {kind} item #{sequence}"
    },
    attributeSelectors: new Dictionary<string, IObservabilityValueSelector<MyMessage>>
    {
        ["kind"] = new KindSelector()
    });

FlowLoggerNode emits FlowLogEntry values. Supply IObservabilityValueSelector<TInput> selectors keyed by attribute name to enrich each entry; an attribute-selector failure is reported on Errors, the offending attribute is skipped, and the entry is still emitted. An unsupported Level throws InvalidOperationException at construction.

Metrics

await using var node = new FlowMetricsNode<MyMessage>(
    new FlowMetricsOptions { InputType = "message", Name = "received", SizeSelector = "payloadBytes" },
    sizeSelector: new PayloadSizeSelector());

FlowMetricsNode emits FlowMetricSnapshot values with total count, current rate, average rate, last observed timestamp, and optional size values. The optional size selector can return numeric values, strings, byte arrays, or collections; a size-selector failure is reported on Errors and the node keeps processing.

Runtime timing

Snapshots and log entries use the node's clock for Timestamp (default TimeProvider.System). Provide a deterministic clock for tests:

new FlowMetricsNode<MyMessage>(options, sizeSelector, clock: new FakeTimeProvider(timestamp));

A time provider also makes counter/metrics rate calculations deterministic.

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 (1)

Showing the top 1 NuGet packages that depend on FluxFlow.Components.Observability:

Package Downloads
FluxFlow.Components.Observability.Composition

Typed observability registration and Designer metadata over host-owned expression, selector, context, and clock resources.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0-rc.1 83 9/5/2026
7.0.0 190 8/3/2026
3.0.2 124 7/3/2026
3.0.1 170 7/2/2026
3.0.0 116 6/19/2026
2.0.0 137 6/18/2026
1.2.1 123 6/15/2026
1.2.0 430 6/12/2026
1.1.0 116 6/5/2026
1.0.0 118 6/4/2026
0.3.0-alpha.1 239 6/2/2026
0.2.0-alpha.1 74 6/2/2026
0.1.1-alpha.1 75 6/2/2026
0.1.0-alpha.1 130 6/1/2026

Rebuilt the counter, logger, and metrics nodes as standalone FlowNode<TInput, TOutput> processors over the FluxFlow.Nodes kit: input in, a FlowCounterSnapshot / FlowLogEntry / FlowMetricSnapshot broadcast out, failures on the error port and diagnostics on the events port — all carrying the message correlation id. The engine factory, module, registration extensions, design-metadata provider, component-type/port constants, the definition-options reader, and the type/selector/expression-engine/context-factory resolution layer are removed; each node takes its options record (and, for the counter, an IFlowExpressionEngine and optional IFlowMapContextFactory from FluxFlow.Mapping) plus an optional TimeProvider directly, and depends only on FluxFlow.Nodes and FluxFlow.Mapping (runs without the engine).