Skip to content

Orleans Dashboard

Applies to: Orleans 10.0

The Orleans Dashboard is a built-in web-based monitoring tool that provides real-time visibility into your Orleans cluster. It allows you to monitor silo health, grain activations, method calls, reminders, and system metrics without requiring external monitoring infrastructure.

For Orleans 10.0, use the official dashboard packages: Microsoft.Orleans.Dashboard and Microsoft.Orleans.Dashboard.Abstractions.

The Orleans Dashboard provides the following capabilities:

  • Cluster overview: View all silos in the cluster with their status, uptime, and resource utilization.
  • Grain monitoring: Track grain activations, method calls, and performance metrics per grain type.
  • Method profiling: Analyze grain method call frequency, latency, and error rates.
  • Reminder management: Browse and monitor all registered reminders across the cluster.
  • Live log streaming: View real-time log output from the cluster.
  • Silo details: Inspect individual silo properties, counters, and grain distributions.
  • Grain state inspection: View the current state of individual grain instances.

The Orleans Dashboard is distributed in two NuGet packages:

PackageDescription
Microsoft.Orleans.DashboardMain dashboard package with UI and API endpoints
Microsoft.Orleans.Dashboard.AbstractionsAbstractions for dashboard integration (e.g., NoProfilingAttribute)

To add the Orleans Dashboard to your application, call AddDashboard() on your silo builder and MapOrleansDashboard() to map the dashboard endpoints:

using Orleans.Dashboard;
var builder = WebApplication.CreateBuilder(args);
// Configure Orleans with the dashboard
builder.UseOrleans(siloBuilder =>
{
siloBuilder.UseLocalhostClustering();
siloBuilder.AddMemoryGrainStorageAsDefault();
// Add the dashboard services
siloBuilder.AddDashboard();
});
var app = builder.Build();
// Map dashboard endpoints at the root path
app.MapOrleansDashboard();
app.Run();

After starting your application, navigate to http://localhost:5000/ (or your configured URL) to access the dashboard.

You can host the dashboard at a custom path by specifying a route prefix:

// Map dashboard endpoints at /dashboard
app.MapOrleansDashboard(routePrefix: "/dashboard");

With this configuration, access the dashboard at http://localhost:5000/dashboard/.

Configure dashboard behavior using DashboardOptions:

siloBuilder.AddDashboard(options =>
{
// Disable the live log streaming endpoint
options.HideTrace = true;
// Set the counter update interval (minimum 1000ms)
options.CounterUpdateIntervalMs = 2000;
// Set the history buffer length for metrics
options.HistoryLength = 200;
});
OptionTypeDefaultDescription
HideTraceboolfalseWhen true, disables the live log streaming endpoint.
CounterUpdateIntervalMsint1000Milliseconds between counter samples. Must be >= 1000.
HistoryLengthint100Number of historical data points to maintain for metrics.

The grain profiler collects method-level performance data. Configure it using GrainProfilerOptions:

builder.Services.Configure<GrainProfilerOptions>(options =>
{
// Always collect profiling data, even when dashboard is inactive
options.TraceAlways = true;
// Time after which profiling stops if dashboard is inactive
options.DeactivationTime = TimeSpan.FromMinutes(5);
});
OptionTypeDefaultDescription
TraceAlwaysboolfalseWhen true, profiling data is continuously collected even when the dashboard is not being queried.
DeactivationTimeTimeSpan1 minuteDuration of inactivity after which profiling automatically stops. Only applies when TraceAlways is false.

Use the [NoProfiling] attribute to exclude specific grains from performance profiling:

using Orleans.Dashboard;
[NoProfiling]
public class HighFrequencyGrain : Grain, IHighFrequencyGrain
{
// This grain won't be included in profiling data
}

The simplest deployment pattern is to host the dashboard directly with your Orleans silo. This is the recommended approach for most scenarios:

using Orleans.Dashboard;
var builder = WebApplication.CreateBuilder(args);
builder.UseOrleans(siloBuilder =>
{
siloBuilder.UseLocalhostClustering();
siloBuilder.UseInMemoryReminderService();
siloBuilder.AddMemoryGrainStorageAsDefault();
siloBuilder.AddDashboard();
});
var app = builder.Build();
app.MapOrleansDashboard();
app.Run();

For scenarios where you want to run the dashboard separately from your silos (for example, to provide a dedicated monitoring endpoint), you can host the dashboard on an Orleans client:

using Orleans.Configuration;
using Orleans.Dashboard;
using System.Net;
// Start the silo host
var siloHostBuilder = Host.CreateApplicationBuilder(args);
siloHostBuilder.UseOrleans(builder =>
{
builder.UseDevelopmentClustering(options =>
options.PrimarySiloEndpoint = new IPEndPoint(IPAddress.Loopback, 11111));
builder.UseInMemoryReminderService();
builder.AddMemoryGrainStorageAsDefault();
builder.ConfigureEndpoints(IPAddress.Loopback, 11111, 30000);
// Dashboard must also be added to silos
builder.AddDashboard();
});
using var siloHost = siloHostBuilder.Build();
await siloHost.StartAsync();
// Create a separate web application for the dashboard
var dashboardBuilder = WebApplication.CreateBuilder(args);
// Configure Orleans client
dashboardBuilder.UseOrleansClient(clientBuilder =>
{
clientBuilder.UseStaticClustering(options =>
options.Gateways.Add(new IPEndPoint(IPAddress.Loopback, 30000).ToGatewayUri()));
// Add dashboard services to the client
clientBuilder.AddDashboard();
});
var dashboardApp = dashboardBuilder.Build();
// Map dashboard endpoints on the client
dashboardApp.MapOrleansDashboard();
await dashboardApp.RunAsync();
await siloHost.StopAsync();

The dashboard endpoints support ASP.NET Core authorization. Use the RequireAuthorization() extension method to protect access:

// Require authentication for dashboard access
app.MapOrleansDashboard()
.RequireAuthorization();

You can also apply specific authorization policies:

// Configure authorization
builder.Services.AddAuthorization(options =>
{
options.AddPolicy("DashboardAccess", policy =>
policy.RequireRole("Admin", "Operator"));
});
builder.Services.AddAuthentication(/* your auth configuration */);
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
// Apply the policy to dashboard endpoints
app.MapOrleansDashboard()
.RequireAuthorization("DashboardAccess");

Dashboard shows “lost connectivity” message

Section titled “Dashboard shows “lost connectivity” message”

This error occurs when the dashboard cannot communicate with the Orleans cluster. Common causes:

  1. Silo not started: Ensure your Orleans silo is running before accessing the dashboard.
  2. Network issues: Verify network connectivity between the dashboard host and silos.
  3. Cluster misconfiguration: Check that clustering is properly configured.

If grain method profiling data is empty:

  1. Make grain calls: Profiling only shows data after grain methods are invoked.
  2. Check TraceAlways: By default, profiling stops after 1 minute of dashboard inactivity. Set TraceAlways = true for continuous profiling.
  3. Check [NoProfiling]: Ensure the grain isn’t marked with the [NoProfiling] attribute.

If the /Trace endpoint returns 403 Forbidden:

  • Check that DashboardOptions.HideTrace is not set to true.

Applies to: Orleans 9.0, Orleans 8.0, Orleans 7.0

The Orleans Dashboard is a built-in monitoring tool introduced in Orleans 10.0. For Orleans 9.0, 8.0, and 7.0, use the unofficial community dashboard package:

Applies to: Orleans 3.x

The Orleans Dashboard is a built-in monitoring tool introduced in Orleans 10.0. For Orleans 3.x, use the unofficial community dashboard package: