Anarchy.Toolkit.Core.Observability 1.0.4

Suggested Alternatives

Anarchy.Toolkit.Core.Telemetry

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

Anarchy.Toolkit.Core.Observability

Observability primitives centered on the Observer facade for logging, metrics and context.

dotnet add package Anarchy.Toolkit.Core.Observability
  • Use Observer with its Logger, MeasurerBase and LogContext to instrument application code.
  • Attach Tags and call-site information with CallSiteEntity, CalledFrom() and ParentCaller().
  • DevelopmentLogger and LoggerMeasurer provide development-friendly implementations.

When to use it

Use Observer in services and adapters that need consistent structured logs and metrics without choosing an organization-specific telemetry backend. It wraps Serilog logging and a measurement abstraction; the host still needs to configure their implementations and destinations.

How to use it

Inject an Observer into the component being instrumented. Prefer call-site-aware wrappers and structured properties:

using Anarchy.Toolkit.Core.Observability.Extension;
using Anarchy.Toolkit.Core.Observability.Service.Observability;

var caller = this.CalledFrom();
observer.LogInformation(caller, "Processing order {OrderId}", orderId);
observer.ExecutionIncrementCount(caller, 1, Tags.Success);

Use observer.MonitoredActionAsync for an async action that should report duration and outcome. Keep high-cardinality values such as IDs in logs rather than metric tags. Configuration supplies a host-level ObserverFactory; Testing supplies an in-memory observer for assertions.

See the observability guide and toolkit overview.

Releases

1.0.4

  • chore(docs): Update release notes

1.0.3

  • build: migrate local automation to NUKE

1.0.2

  • docs: expand package guides and release histories

1.0.1

  • Added a package-specific NuGet README.

1.0.0

  • Introduced the observer facade, structured logging context, call-site capture and measurement primitives.
Product Compatible and additional computed target framework versions.
.NET 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.

Initial release.