RP.Prober 1.0.42

dotnet add package RP.Prober --version 1.0.42
                    
NuGet\Install-Package RP.Prober -Version 1.0.42
                    
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="RP.Prober" Version="1.0.42" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RP.Prober" Version="1.0.42" />
                    
Directory.Packages.props
<PackageReference Include="RP.Prober" />
                    
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 RP.Prober --version 1.0.42
                    
#r "nuget: RP.Prober, 1.0.42"
                    
#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 RP.Prober@1.0.42
                    
#: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=RP.Prober&version=1.0.42
                    
Install as a Cake Addin
#tool nuget:?package=RP.Prober&version=1.0.42
                    
Install as a Cake Tool

Prober – Lightweight Runtime Data Probing with Minimal Application Impact

Prober is a lightweight .NET library that enables efficient runtime data monitoring from your application with minimal overhead and app impact. It offers flexible probing mechanisms that cache data internally and expose it through a REST API – ideal for debugging, UI visualization, logging, or real-time telemetry.

🌟 Key Features

Minimal Impact: Data is only processed when requested (lazy conversion).

Flexible Probing Types:

  • Cyclic Cached Prober – Circular buffer with fixed size.
  • Key-Value Cached Prober – Object cache accessed by ID.
  • Single Object Prober – Holds and exposes a single data object.
  • Custom Conversion: Convert input objects to tabular List<List<string>> format for easy UI integration.
  • Built-in REST API Support: Just start a Kestrel server in your app to expose data.
  • Generic UI Support: Thanks to the uniform tabular output format, UIs can generically render any probed data.

πŸ”§ How It Works

When you create a Prober instance, you define:

  1. The data type you want to probe.
  2. A converter function to transform the data to a table-like format (List<List<string>>).
  3. Header metadata for visualization. The actual data conversion only happens on demand (e.g., when a UI requests it via the API). All active probers are registered into a central "club" that manages and serves data to any registered consumer (UI, logger, etc.).

πŸš€ Example: Cyclic Cache Prober

C# Code:

var prober = new CyclicCacheProbing<Measurment>(
  maxCachedValues: 100,
  name: "Measurement Prober",
  headers: new List<string>() { "Counter", "Height", "Width", "Size", "Desctiption" },
  headerType: HeaderType.Column);

prober.Convert = (measure) => new List<string> {
  $"{measure.Counter}",
  $"{measure.Height}",
  $"{measure.Width}",
  $"{measure.Size}",
  $"{measure.Description}"
};

// Simulate adding random data
Task.Run(() =>
  {
    while (true)
    {
      Thread.Sleep(100);
      
      prober.EnqueueCyclic(new Measurment(
        height: Random.Shared.Next(1, 10),
        width: Random.Shared.Next(11, 20),
        size: Random.Shared.Next(21, 30),
        description: GetRandomWord()));
    }
  });

🧠 Example: Keyed Cache Prober

C# Code:

var keyedCacheProbing = new KeyedCacheProbing<string, Measurment>(
    name: "Keyed Measurement Prober",
    headers: new List<string> { "Key" }.Concat(new List<string>() { "Counter", "Height", "Width", "Size", "Desctiption" }).ToList(),
    keepSortedKeys: true);

keyedCacheProbing.Convert = (key, measure) => new List<string> {
    $"{key}",
    $"{measure.Counter}",
    $"{measure.Height}",
    $"{measure.Width}",
    $"{measure.Size}",
    $"{measure.Description}"
};

// Simulate adding random keyed data
Task.Run(() =>
{
    while (true)
    {
        Thread.Sleep(100);
        var key = GetRandomKey();
        var measure = new Measurment(
            height: Random.Shared.Next(1, 10),
            width: Random.Shared.Next(11, 20),
            size: Random.Shared.Next(21, 30),
            description: GetRandomWord());

        keyedCacheProbing.SetKeyValue(key, measure);
    }
});

string GetRandomKey() =>
    new[] { "Flow1", "Flow2", "Flow3", "Flow4", "Flow5", "Flow6" }[Random.Shared.Next(6)];

string GetRandomWord() =>
    new[] { "apple", "banana", "cherry", "dog", "elephant", "flower" }[Random.Shared.Next(6)];

πŸ“Š Example: Table Cache Prober

C# Code:

var tableCacheProbing = new TableCacheProbing<MyTable>("Table Prober");

tableCacheProbing.Convert = (table) =>
{
    var result = new List<List<string>>();
    foreach (var row in table.Values)
    {
        result.Add(row.Select(cell => cell.ToString()).ToList());
    }
    return result;
};

// Set initial data
tableCacheProbing.SetTableData(new MyTable());

public class MyTable
{
    public List<List<object>> Values = new List<List<object>>();

    public MyTable()
    {
        Values.Add(new List<object> { "Table1" });
        Values.Add(new List<object> { "Values", "Values" });
        Values.Add(new List<object> { 10, 20, 30, 40, 50, 60, 70, 80, 90 });
        Values.Add(new List<object> { 10, 20, 30, 40, 50, 60, 70, 80, 90 });
        Values.Add(new List<object> { 10, 20, 30, 90 });
        Values.Add(new List<object> { "Table2" });
        Values.Add(new List<object> { "Values", "Values" });
        Values.Add(new List<object> { 10, 20, 30, 80, 90 });
        Values.Add(new List<object> { 10, 20, 30, 40, 50, 60, 70, 80, 90 });
    }
}

πŸ“‘ REST API for External Access

To expose probed data, integrate this controller in your ASP.NET Core app:

C# Code:

[ApiController]
[Route("api/[controller]")]
public class ProberCacheMonitoringController : ControllerBase
{
    [HttpGet("CachedTablesNames")]
    public ActionResult<List<ExtendedTableInfo>> GetCachedTablesNames()
    {
        return ProberCacheClub.ProberCacheClubSingleton.GetCachedTablesNames();
    }

    [HttpPost("CachedTables")]
    public ActionResult<List<Table>> GetCachedTables([FromBody] List<Guid> tablesGuid)
    {
        return ProberCacheClub.ProberCacheClubSingleton.GetCachedTables(tablesGuid);
    }
}

Just launch your Kestrel web server, and you're ready to remotely inspect live application data!

πŸ’‘ Use Cases

  • Real-time UI dashboards
  • File/CSV/DB recording
  • Debug visualization
  • Remote telemetry in distributed systems

πŸ“¦ Install via NuGet

dotnet add package RP.Prober

πŸ–₯️ Blazor UI for Viewing Prober Data

The RP.Prober.Razor.Component NuGet package provides a generic Blazor UI component that can automatically discover and display live data from multiple running applications that use the Prober system.

πŸ“¦ Required NuGet Packages

To integrate the Prober UI into your Blazor WebAssembly or Server project, make sure to include the following NuGet packages:

Blazor App Csproj Dependencies:

<PackageReference Include="RP.Infra" Version="1.0.3" />
<PackageReference Include="RP.Prober" Version="1.0.7" />
<PackageReference Include="RP.Prober.Razor.Component" Version="1.0.7" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />

πŸ”§ Register Required Services

In your Program.cs (or wherever you configure services), add the following lines:

C# Code At Blazor Page At Program.cs:

builder.Services.AddSingleton<ProberCacheMonitoringService>(); // Consumes data from multiple apps
builder.Services.AddSingleton<IServicesInfo>(new ServicesInfo()); // Discovers available apps/services to probe
builder.Services.AddBlazoredLocalStorage(); // Needed by the Razor component for state management

If you're using the built-in ServicesInfo implementation (recommended for simpler setups), you need to define environment variables that describe each app that Prober should connect to.

Here’s an example for a service called RanBlazor:

Environment Variables:

"Services:RanBlazor:Ip": "127.0.0.1",
"Services:RanBlazor:RestApiPort": "7287",
"Services:RanBlazor:SupportProberMonitor": "true",
"Services:RanBlazor:RestApiSecured": "true"

You can configure multiple services this way, each under its own key (e.g., Services:App1, Services:App2, etc.).

πŸ’» Razor Page Integration

To display all the probed data in your app’s UI, add the following to any .razor page:

Razor Page:

@page "/ProberDashboard"
@using RP.Prober.Razor.Component

<PageTitle>Prober Dashboard</PageTitle>

<ProberView />

The <ProberView /> component will auto-fetch and display data from all configured and running Prober-enabled services.

πŸ” Summary

  • All probed data from any number of apps is collected through ProberCacheMonitoringService.
  • The IServicesInfo implementation (like ServicesInfo) provides discovery metadata based on your environment.
  • The Blazor UI uses ProberView to render real-time data tables.
  • No extra setup is needed in the UI per prober β€” once probers are registered and REST APIs are live, the UI picks them up.

Prober UI Screen Shot:

Screenshot

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 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 RP.Prober:

Package Downloads
RP.Prober.Razor.Component

Razor Component Of Prober

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.42 159 6/14/2025
1.0.41 228 5/12/2025
1.0.40 81 5/10/2025
1.0.11-preview.39 34 5/10/2025
1.0.11-preview.38 30 5/10/2025
1.0.11-preview.1 29 5/10/2025
1.0.10 84 5/10/2025
1.0.9 93 5/9/2025
1.0.8 87 5/9/2025
1.0.7 158 5/8/2025
1.0.6 159 5/6/2025
1.0.5 155 5/5/2025
1.0.4 145 5/5/2025
1.0.2 161 5/4/2025
1.0.1 155 5/4/2025
1.0.0 146 5/4/2025