XiHan.Framework.Observability.Abstractions
5.0.0-preview.1
Prefix Reserved
This is a prerelease version of XiHan.Framework.Observability.Abstractions.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package XiHan.Framework.Observability.Abstractions --version 5.0.0-preview.1
NuGet\Install-Package XiHan.Framework.Observability.Abstractions -Version 5.0.0-preview.1
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="XiHan.Framework.Observability.Abstractions" Version="5.0.0-preview.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XiHan.Framework.Observability.Abstractions" Version="5.0.0-preview.1" />
<PackageReference Include="XiHan.Framework.Observability.Abstractions" />
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 XiHan.Framework.Observability.Abstractions --version 5.0.0-preview.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XiHan.Framework.Observability.Abstractions, 5.0.0-preview.1"
#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 XiHan.Framework.Observability.Abstractions@5.0.0-preview.1
#: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=XiHan.Framework.Observability.Abstractions&version=5.0.0-preview.1&prerelease
#tool nuget:?package=XiHan.Framework.Observability.Abstractions&version=5.0.0-preview.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XiHan.Framework.Observability.Abstractions
可观测性契约(Ring 2,RFC-0023)。
| 契约 | 用途 |
|---|---|
ObservabilityCapabilities |
能力 ID:observability.export(导出器)与 observability.host(运行信息),接口版本 1 |
IHostMonitor |
进程与所在主机的运行信息:ReadRuntime / ReadProcessor / ReadMemory / ReadDisks / ReadNetworkInterfaces / ReadGpus / ReadBoard |
RuntimeInfo |
操作系统、.NET、机器名与用户名(运行进程的系统账户,不是登录凭据,ToString() 照常打印,ADR-0093)、进程 ID / 名称 / 启动时刻 / 运行时长、系统启动时刻 / 运行时长、工作集 / 私有字节 / 托管堆、线程数 / 句柄数、三代 GC 次数、进程 CPU 使用率 |
ProcessorInfo |
型号、厂商、架构、物理 / 逻辑核心、标称频率(MHz)、最后一级缓存、系统 CPU 使用率 |
MemoryInfo |
总量、可用、空闲、缓存,算出已用与使用率 |
DiskInfo |
挂载点或盘符、设备、卷标、文件系统、类型、总量 / 空闲 / 当前用户可用,算出已用与使用率 |
NetworkInterfaceInfo |
ID、名称、描述、类型、状态、速率、物理地址、IPv4 / IPv6 地址、网关、DNS、累计收发字节与包数、收发速率 |
GpuInfo |
名称、厂商、PCI 厂商 / 设备 ID、驱动与版本、显存、温度 |
BoardInfo |
主板厂商 / 型号 / 版本 / 序列号、整机厂商 / 型号、BIOS 厂商 / 版本 / 日期 |
var monitor = services.GetRequiredService<IHostMonitor>();
var cpu = monitor.ReadProcessor(); // cpu.UsagePercent 在启动后第一个采样间隔内为 null
读不到的项为 null,不以 0 或空串顶替,界面据此区分「没有」与「为零」。读取不阻塞、不抛出、不启动外部命令。
依赖方向
只依赖 XiHan.Framework.Primitives。实现见 Observability.Host。
状态
P5:可用。
| Product | Versions 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.
-
net10.0
- XiHan.Framework.Primitives (>= 5.0.0-preview.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on XiHan.Framework.Observability.Abstractions:
| Package | Downloads |
|---|---|
|
XiHan.Framework.Observability.OpenTelemetry
曦寒框架可观测性的 OpenTelemetry 提供程序 |
|
|
XiHan.Framework.Observability.Host
曦寒框架进程与主机运行信息库 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0-preview.2 | 49 | 11/6/2026 |
| 5.0.0-preview.1 | 53 | 11/4/2026 |