Orleans.GpuBridge.Diagnostics
0.3.0
dotnet add package Orleans.GpuBridge.Diagnostics --version 0.3.0
NuGet\Install-Package Orleans.GpuBridge.Diagnostics -Version 0.3.0
<PackageReference Include="Orleans.GpuBridge.Diagnostics" Version="0.3.0" />
<PackageVersion Include="Orleans.GpuBridge.Diagnostics" Version="0.3.0" />
<PackageReference Include="Orleans.GpuBridge.Diagnostics" />
paket add Orleans.GpuBridge.Diagnostics --version 0.3.0
#r "nuget: Orleans.GpuBridge.Diagnostics, 0.3.0"
#:package Orleans.GpuBridge.Diagnostics@0.3.0
#addin nuget:?package=Orleans.GpuBridge.Diagnostics&version=0.3.0
#tool nuget:?package=Orleans.GpuBridge.Diagnostics&version=0.3.0
Orleans.GpuBridge.Diagnostics
GPU telemetry, metrics collection, and observability for Orleans GPU Bridge.
Overview
Orleans.GpuBridge.Diagnostics provides comprehensive monitoring and observability capabilities for GPU-accelerated Orleans applications. It enables real-time metrics collection, telemetry export, and performance tracking across GPU devices.
Key Features
- GPU Device Metrics: Memory usage, utilization, temperature, and queue depth
- System Metrics: CPU, memory, and overall system health monitoring
- OpenTelemetry Integration: Export metrics to Prometheus, Jaeger, and other backends
- Transfer Direction Tracking: Monitor host-to-device and device-to-host data movement
- Custom Metric Providers: Extensible architecture for domain-specific metrics
Installation
dotnet add package Orleans.GpuBridge.Diagnostics
Quick Start
Basic Configuration
using Orleans.GpuBridge.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
services.AddGpuBridge()
.AddGpuTelemetry(options =>
{
options.CollectionInterval = TimeSpan.FromSeconds(5);
options.EnableGpuMetrics = true;
options.EnableSystemMetrics = true;
});
Accessing Telemetry
public class MonitoringService
{
private readonly IGpuTelemetry _telemetry;
public MonitoringService(IGpuTelemetry telemetry)
{
_telemetry = telemetry;
}
public async Task<GpuDeviceMetrics> GetDeviceMetricsAsync(int deviceIndex)
{
return await _telemetry.GetDeviceMetricsAsync(deviceIndex);
}
public async Task<SystemMetrics> GetSystemMetricsAsync()
{
return await _telemetry.GetSystemMetricsAsync();
}
}
OpenTelemetry Integration
services.AddOpenTelemetry()
.WithMetrics(builder => builder
.AddGpuBridgeInstrumentation()
.AddPrometheusExporter());
Configuration Options
public class GpuMetricsOptions
{
// Collection frequency
public TimeSpan CollectionInterval { get; set; } = TimeSpan.FromSeconds(10);
// Enable/disable metric categories
public bool EnableGpuMetrics { get; set; } = true;
public bool EnableSystemMetrics { get; set; } = true;
public bool EnableTransferMetrics { get; set; } = true;
// Retention settings
public int MetricHistorySize { get; set; } = 1000;
}
Available Metrics
GPU Device Metrics
| Metric | Description | Unit |
|---|---|---|
gpu.memory.used |
Used GPU memory | bytes |
gpu.memory.total |
Total GPU memory | bytes |
gpu.utilization |
GPU compute utilization | percent |
gpu.temperature |
GPU temperature | celsius |
gpu.queue.depth |
Current queue depth | count |
gpu.power.draw |
Current power consumption | watts |
System Metrics
| Metric | Description | Unit |
|---|---|---|
system.cpu.utilization |
CPU utilization | percent |
system.memory.used |
Used system memory | bytes |
system.memory.available |
Available system memory | bytes |
Transfer Metrics
| Metric | Description | Unit |
|---|---|---|
transfer.host_to_device.bytes |
Data transferred to GPU | bytes |
transfer.device_to_host.bytes |
Data transferred from GPU | bytes |
transfer.duration |
Transfer operation duration | milliseconds |
API Reference
IGpuTelemetry Interface
public interface IGpuTelemetry
{
Task<GpuDeviceMetrics> GetDeviceMetricsAsync(int deviceIndex);
Task<IReadOnlyList<GpuDeviceMetrics>> GetAllDeviceMetricsAsync();
Task<SystemMetrics> GetSystemMetricsAsync();
void RecordTransfer(TransferDirection direction, long bytes, TimeSpan duration);
}
GpuMetricsCollector
The GpuMetricsCollector is a background service that continuously collects metrics:
// Automatically started when telemetry is enabled
services.AddHostedService<GpuMetricsCollector>();
Dependencies
- Microsoft.Extensions.Diagnostics (>= 9.0.0)
- OpenTelemetry.Api (>= 1.9.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.0)
License
MIT License - Copyright (c) 2025 Michael Ivertowski
For more information, see the Orleans.GpuBridge.Core Documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 was computed. 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. |
-
net9.0
- Microsoft.DotNet.ILCompiler (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Options (>= 10.0.1)
- Microsoft.NET.ILLink.Tasks (>= 9.0.11)
- OpenTelemetry (>= 1.14.0)
- OpenTelemetry.Api (>= 1.14.0)
- OpenTelemetry.Exporter.Console (>= 1.14.0)
- OpenTelemetry.Exporter.Jaeger (>= 1.5.1)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.14.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.12.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.14.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.14.0)
- OpenTelemetry.Instrumentation.Http (>= 1.14.0)
- OpenTelemetry.Instrumentation.Process (>= 0.5.0-beta.7)
- OpenTelemetry.Instrumentation.Runtime (>= 1.14.0)
- Orleans.GpuBridge.Abstractions (>= 0.3.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Orleans.GpuBridge.Diagnostics:
| Package | Downloads |
|---|---|
|
Orleans.GpuBridge.HealthChecks
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.