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
                    
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="Orleans.GpuBridge.Diagnostics" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orleans.GpuBridge.Diagnostics" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Orleans.GpuBridge.Diagnostics" />
                    
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 Orleans.GpuBridge.Diagnostics --version 0.3.0
                    
#r "nuget: Orleans.GpuBridge.Diagnostics, 0.3.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 Orleans.GpuBridge.Diagnostics@0.3.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=Orleans.GpuBridge.Diagnostics&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Orleans.GpuBridge.Diagnostics&version=0.3.0
                    
Install as a Cake Tool

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 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. 
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 Orleans.GpuBridge.Diagnostics:

Package Downloads
Orleans.GpuBridge.HealthChecks

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 78 2/9/2026
0.2.1 438 12/8/2025
0.2.0 172 12/5/2025
0.1.0 338 11/30/2025