Skip to content

Commit 6880d3f

Browse files
authored
Add zone pivots for Orleans 10 documentation (#51272)
* Add Orleans 8.0, 9.0, and 10.0 zone pivot infrastructure - Add orleans-10-0, orleans-9-0, orleans-8-0 pivots to zone-pivot-groups.yml - Update overview.md with version-specific 'What's new' sections for each Orleans version - Create shared include files for version-specific notices (preview, alpha, version note) This enables version-specific documentation content across Orleans docs. * Add Orleans Dashboard documentation - Create comprehensive dashboard documentation at docs/orleans/dashboard/index.md - Document installation, configuration, deployment patterns, and authorization - Include API endpoints reference and troubleshooting section - Add Dashboard entry to toc.yml under Host section - Use zone pivot for orleans-10-0 with fallback for earlier versions * Add Orleans Durable Jobs documentation * Add Orleans Journaling documentation * Add Orleans NATS JetStream streaming provider documentation * Add Orleans 7.0 to 10.0 migration guide with breaking changes documentation * Add Orleans 8.x documentation: timers API and resource-optimized placement - Update timers-and-reminders.md with zone pivots: - Orleans 8.0+ RegisterGrainTimer API with GrainTimerCreationOptions - Orleans 7.0 legacy RegisterTimer API (marked obsolete) - Migration guide with behavior differences (interleaving default changed) - Complete code examples and options table - Update grain-placement.md with zone pivots: - Note ResourceOptimizedPlacement is default in Orleans 9.2+ - ResourceOptimizedPlacementOptions configuration table - Version-specific default placement strategy documentation * Add Orleans 9.x documentation: grain directories, testing, placement, and memory shedding - Document Strong-Consistency Distributed Grain Directory with consistent hashing - Document ADO.NET Grain Directory with multi-database support - Add InProcessTestCluster documentation as recommended testing approach - Document Silo Metadata and Placement Filtering for deployment flexibility - Add Memory-Based Activation Shedding to grain lifecycle and activation collection - Update NuGet packages documentation with Orleans 9.x packages * Update deprecated ClientBuilder API references with zone pivots - Add zone pivots to tutorials-and-samples/overview-helloworld.md for modern Orleans patterns - Orleans 7.0+ now shows UseOrleansClient() pattern as default - Orleans 3.x preserves legacy ClientBuilder pattern in zone pivot - Add deprecation notice to deployment/docker-deployment.md for Orleans 1.x/2.0 legacy APIs * Update deprecated SiloHostBuilder API references with zone pivots * Add managed identity authentication examples for Azure Storage configuration - Add tabbed content showing managed identity (recommended) and connection string patterns - server-configuration.md: Update Azure clustering examples with DefaultAzureCredential - client-configuration.md: Add managed identity examples for client Azure clustering - client.md: Add managed identity examples for external client configuration - typical-configurations.md: Already had managed identity patterns with zone pivots The managed identity pattern using DefaultAzureCredential is now shown as the recommended approach for production environments, with connection string pattern preserved for development scenarios and backward compatibility. * Add comprehensive Redis providers documentation with Aspire examples * Complete Azure Storage managed identity pattern updates * Add deprecation notices and modernize Cloud Services docs - Add CAUTION notice to troubleshooting-azure-cloud-services-deployments.md indicating Azure Cloud Services (classic) retired August 31, 2024 - Add zone pivots to troubleshooting-deployments.md with modern container-focused troubleshooting for Orleans 7.0+ - Update configuration-guide/index.md to reference modern deployment options - Mark Cloud Services TOC entry as (Legacy) - Add CancellationToken support documentation to observers.md - Add Orleans 10.0 system target CancellationToken support to cancellation-tokens.md - Add membership protocol improvements section to cluster-management.md * Add comprehensive .NET Aspire integration documentation - Create docs/orleans/host/aspire-integration.md with full Aspire guide - Document AppHost extension methods (AddOrleans, WithClustering, etc.) - Document silo and client project configuration with Aspire - Add ServiceDefaults pattern with OpenTelemetry for Orleans - Add Azure Storage with Aspire examples - Add development vs production configuration patterns - Add to toc.yml under Host section * Add activation repartitioning documentation - Add Activation repartitioning section to grain-placement.md - Document AddActivationRepartitioner extension method - Document ActivationRepartitionerOptions with full configuration table - Explain algorithm: edge tracking, probabilistic data structure, anchoring filter - Add performance considerations and when-to-use guidance - Include experimental warning for ORLEANSEXP001 - Zone pivots for Orleans 9.0+, 8.0, and 7.0/3.x * Fix markdown linting issues in Orleans documentation - Fix MD044: Proper capitalization of 'Orleans' in zone pivot markers - Fix MD032: Add blank lines around lists - Fix MD012: Remove multiple consecutive blank lines Auto-fixed 45 issues across 13 files using markdownlint-cli2 * Fix markdown syntax issues and typos - Fix unclosed code block in grainservices.md (extra space before closing fence) - Fix unclosed code block in journaledgrain-diagnostics.md (extra space before fence) - Fix 'Glain' typo to 'Grain' in grain-placement-filtering.md - Fix 'filterting' typo to 'filtering' in grain-placement-filtering.md - Remove trailing whitespace in grain-placement-filtering.md * Fix zone pivots * Fix pivot-id-unused warnings by adding missing Orleans version pivots * Add Orleans zone pivot IDs to MD044 allowed names * Remove Orleans from MD044 proper-names and clean up suppression comments * Fix indentation of zone pivot directives in grainservices.md * Remove Introduced column from package tables in nuget-packages.md * Remove pre-release package docs (Durable Jobs, Journaling, NATS, ADO.NET Streaming) * Clean up membership protocol docs: remove version-note include, fix timing, remove subjective language * Fix nuget-packages.md: Core packages not deprecated, dashboard only for Orleans 10.0 * Remove Docker deployment from TOC (article retained to prevent link rot) * Fix validation errors: nested zones, broken xrefs * Fix SiloUnavailableException description: indicates target silo unavailable, not connection failure * Change logging examples from Warning to Information level * Fix troubleshooting: Orleans uses clustering providers, not DNS service discovery * Recommend managed identity over connection strings * Update code examples to use Host.CreateApplicationBuilder pattern - Replace new HostBuilder() with Host.CreateApplicationBuilder(args) - Update Aspire package versions from 9.0.0 to 13.1.0 - Add keyed services guidance for Aspire integration (AddKeyed* methods required) - Update grain services, timers/reminders, client config, and versioning examples - Update custom grain storage snippet to use modern pattern * Add credential chain guidance for Azure authentication * docs(orleans): add .NET Aspire as recommended approach for production apps Update Orleans documentation to establish .NET Aspire as the recommended approach for building production-ready Orleans applications. Key changes: - Fix aspire-integration.md extension methods table with all 15 methods - Update UseOrleans() pattern to parameterless version - Add Aspire examples for clustering (Redis, Azure Table, Cosmos DB) - Add Aspire examples for grain storage (Blob, Table) - Add Aspire examples for reminders (Redis, Azure Table, in-memory) - Add Aspire examples for streaming (Azure Queue, in-memory, broadcast) - Add Aspire cross-reference callouts to configuration docs - Add Aspire deployment section to Azure Container Apps guide - Add Aspire Kubernetes manifest generation to kubernetes.md - Add Aspire Next Steps section to quickstart - Add Aspire TIP callout to tutorial-1.md All Aspire content uses zone pivots for Orleans 8.0+ to maintain compatibility with older Orleans version documentation. Assistant-model: Claude * fix(orleans): resolve nested zone errors in docs build * docs(orleans): remove HTTP API endpoints from dashboard docs * docs(orleans): replace azd with Aspire CLI for Azure Container Apps deployment * docs(orleans): replace azd with Aspire CLI for Kubernetes deployment * docs(orleans): correct version compatibility info for Orleans 7+ * docs(orleans): expand Kubernetes Aspire section with detailed instructions * docs(orleans): use DefaultAzureCredential in Azure authentication examples Replace ManagedIdentityCredential with DefaultAzureCredential in all code examples. DefaultAzureCredential works seamlessly across local development and production environments, while ManagedIdentityCredential only works when deployed to Azure with managed identity enabled. - Update credential-chain-guidance.md include to explain DAC benefits - Update azure-storage.md grain persistence examples - Update server-configuration.md clustering examples - Update client-configuration.md clustering examples - Update typical-configurations.md production examples - Update client.md external client examples - Rename tabs from 'Managed identity' to 'Microsoft Entra ID' The include file now mentions ManagedIdentityCredential as an optional production optimization per Microsoft's credential chain guidance. * docs(orleans): remove system targets reference from cancellation-tokens.md System targets are internal implementation details not relevant to users. * docs(orleans): fix CollectionAge default value (15 minutes, not 2 hours) * docs(orleans): remove AddKeyed* note, add comments in code examples instead Replace the IMPORTANT note about AddKeyed* methods with inline code comments that explain why the call is needed. * docs(orleans): migrate serialization.md inline code to buildable snippets Replace 12 inline C# code blocks in serialization.md (Orleans 10/9/8 zone) with :::code references to compilable snippet files. Snippet project features: - Targets .NET 10.0 with Orleans 10.0.0 packages - Includes MessagePack serialization configuration examples - Includes surrogate type examples with IConverter and IPopulator - All code blocks verified to compile successfully Files added: - snippets/serialization/serialization.csproj - snippets/serialization/BasicTypes.cs (5 regions) - snippets/serialization/MessagePackExamples.cs (4 regions) - snippets/serialization/SurrogateExamples.cs (2 regions) - snippets/serialization/GrainStorageExamples.cs (1 region) - snippets/serialization/Program.cs * docs(orleans): migrate grain-persistence inline code to snippets * docs(orleans): migrate interceptors.md inline code to buildable snippets - Create interceptors snippet project targeting net10.0 with Orleans 10.0.0 - Extract filter implementations to separate .cs files with region markers - Replace inline code blocks with :::code references (17 snippets migrated) - Keep interface definitions inline for documentation clarity - Build passes with 0 warnings, 0 errors * docs(orleans): cleanup duplicate OutgoingLoggingCallFilter from OutgoingFilters.cs * docs(orleans): migrate streams-programming-apis.md inline code to snippets - Create streaming snippet project with buildable C# code examples - Add BasicStreaming.cs, ImplicitSubscriptions.cs, ExplicitSubscriptions.cs, Configuration.cs - Update AddAzureQueueStreams API calls to Orleans 10.0 syntax (configurator-based) - Replace inline code blocks with :::code snippet references - Fix outdated AzureQueueDataAdapterV2 type parameter pattern (no longer supported) * docs(orleans): migrate aspire-integration.md inline code to buildable snippets - Create multi-project Aspire snippet solution with AppHost, Silo, Client, ServiceDefaults, SharedContracts - Add 13 :::code references replacing inline code blocks - AppHost examples: basic cluster, storage/reminders, separate silo/client, Azure Storage, dev/prod configs - Silo/Client examples: basic config, explicit connection string - ServiceDefaults: OpenTelemetry configuration pattern - All projects target net10.0, Orleans 10.0.0, Aspire 9.1.0 * docs(orleans): add health checks snippet to aspire-integration.md - Add health_checks region to SiloProgram.cs with GrainHealthCheck and SiloHealthCheck examples - Replace inline health checks code block with :::code reference - Add Projects.cs stub with IProjectMetadata types for Silo and Client * docs(orleans): migrate timers-and-reminders.md inline code to snippets - Update timers snippet project to net10.0 with Orleans 10.0.0 - Add TimerExamples.cs with grain_timer_example and migrate_after regions - Add ReminderConfiguration.cs with configure_azure_table, configure_adonet, configure_inmemory, configure_redis, configure_cosmos regions - Replace 7 inline code blocks with :::code references - Keep Aspire examples inline (require Aspire SDK, show AppHost+Silo pairs) - Keep short method signature examples inline (ReceiveReminder, etc.) * docs(orleans): add centralized Directory.Build.props and complete timers Aspire migration - Add Directory.Build.props at docs/orleans/ with centralized package versions: - OrleansVersion: 10.0.0 - HostingVersion: 10.0.0 - AspireVersion: 9.1.0 - AzureIdentityVersion: 1.17.0 - Update all snippet projects to use and variables - Remove nested Directory.Build.props files (now inherited from parent) - Migrate Aspire reminder examples in timers-and-reminders.md to :::code references - Add reminder configuration regions to Aspire snippet files - Fix AddKeyedAzureTableClient method name (was AddKeyedAzureTableServiceClient) - All snippet projects verified to build successfully * docs(orleans): add validate-snippets.ps1 for CI snippet validation - PowerShell script to find and build all snippet projects - Supports sequential (default) and parallel build modes - Reports success/failure with detailed output for failures - Returns exit code 1 on failure for CI integration - Verified: all 27 snippet projects pass * docs(orleans): upgrade Aspire packages to 13.1.0 * docs(orleans): fix IGrainStorageSerializer example to use class instead of interface * docs(orleans): fix CreateMultiplexer to use Task.FromResult instead of async * updates * docs(orleans): update snippet projects and fix obsolete Azure APIs - Remove Directory.Build.props: inline build properties into all 27 csproj files - Add SourceLink disable properties for git worktree compatibility - Update to Orleans 9.0.0 and net9.0 across all snippet projects - Replace obsolete Configure*ServiceClient() calls with direct property assignment - Fix testing.md to accurately describe InProcessTestCluster vs TestCluster differences - Remove duplicate migration guide entry from toc.yml * docs(orleans): improve cluster management, lifecycle, and grain directory docs - cluster-management.md: Remove incorrect advice about NumProbedSilos overhead, clarify IAmAlive disaster recovery behavior - silo-lifecycle.md: Replace AddStartupTask implementation details with usage example, avoid grain calls in startup tasks - grain-directory.md: Clarify difference between eventually-consistent default directory and strongly-consistent AddDistributedGrainDirectory, rename 'in-memory' to 'in-cluster' for accuracy * docs(orleans): add experimental preview notice to strongly-consistent directory * docs(orleans): fix Aspire integration examples and serialization table - Remove redundant .WithReference() calls for backing resources in AppHost examples - Add .RunAsEmulator() for Azure Storage/Cosmos DB local development - Fix incorrect tip about Aspire automatically using Azurite - Add note clarifying that .WithClustering() etc. include resource references - Simplify serializer comparison table version tolerance to Yes for all * docs(orleans): add CancellationToken to grain method examples Best practice is to always include CancellationToken parameter even when the method doesn't observe it, to allow cancellation propagation and future-proof the API. * docs(orleans): add memory-aware activation rebalancing documentation * fix(orleans): add solution file for host snippets to fix CI build * docs(orleans): create Orleans 3.x server-config snippet project - Create snippets-v3/server-config directory under host/configuration-guide - Add server-config.csproj with Orleans 3.7.2 and Azure Storage clustering - Add Configuration.cs with region markers for: - Full silo configuration example - Azure clustering provider - ClusterOptions configuration - Endpoint configuration (simple and detailed) - ConfigureApplicationParts pattern - Update Azure clustering to use ConfigureTableServiceClient pattern - All snippets verified to build successfully * docs(orleans): update server-configuration.md to use Orleans 3.x snippets Replace 6 inline code blocks in the Orleans 3.x documentation section with :::code references to the buildable snippet project: - Full silo configuration (full_silo_config) - Azure clustering provider (azure_clustering) - ClusterOptions configuration (cluster_options) - Simple endpoints configuration (configure_endpoints) - Detailed EndpointOptions configuration (endpoint_options) - Application parts configuration (application_parts) This also fixes the deprecated ConnectionString pattern to use the modern ConfigureTableServiceClient approach. * docs(orleans): create Orleans 3.x client-config snippet project Create buildable snippet project for Orleans 3.x client configuration: - client-config.csproj targeting net6.0 with Orleans 3.7.2 packages - Configuration.cs with region markers: - full_client_config: Complete ClientBuilder configuration - cluster_options: ClusterOptions configuration - azure_clustering: Azure Table Storage clustering - application_parts: ConfigureApplicationParts pattern Uses modern ConfigureTableServiceClient instead of deprecated ConnectionString property. * docs(orleans): update client-configuration.md to use Orleans 3.x snippets Replace 3 inline code blocks in the Orleans 3.x documentation section with :::code references to the buildable snippet project: - Full client configuration (full_client_config) - Azure clustering provider (azure_clustering) - Application parts configuration (application_parts) This also fixes the deprecated ConnectionString pattern to use the modern ConfigureTableServiceClient approach. * docs(orleans): add Orleans 3.x local-dev snippet project Create buildable snippet project for local development configuration: - local-dev.csproj with Orleans 3.7.2 and .NET 6.0 - LocalDevelopment.cs with silo_localhost and client_localhost regions - Uses HostBuilder pattern for silo and ClientBuilder for client * docs(orleans): update local-development-configuration.md to use Orleans 3.x snippets Replace inline code blocks with :::code references: - Silo localhost config -> snippets-v3/local-dev/LocalDevelopment.cs id=silo_localhost - Client localhost config -> snippets-v3/local-dev/LocalDevelopment.cs id=client_localhost Fixes bug in original inline client code where 'builder' was undefined * docs(orleans): add Orleans 3.x code-generation snippet project Create buildable snippet project for code generation examples: - code-generation.csproj with Orleans 3.7.2, OrleansCodeGenerator, and .NET 6.0 - CodeGeneration.cs with region markers: - with_code_generation: ConfigureApplicationParts with WithCodeGeneration() - with_code_generation_logging: WithCodeGeneration with ILoggerFactory - add_application_part: Adding external assembly as application part * docs(orleans): update code-generation.md to use Orleans 3.x snippets Replace inline code blocks with :::code references: - WithCodeGeneration() example -> snippets-v3/code-generation/CodeGeneration.cs id=with_code_generation - WithCodeGeneration(loggerFactory) -> id=with_code_generation_logging - AddApplicationPart() -> id=add_application_part * docs(orleans): add Orleans 3.x grainservices snippet project Create buildable snippet project for grain service examples: - grainservices.csproj with Orleans 3.7.2, OrleansRuntime, and .NET 6.0 - GrainServices.cs with region markers: - data_service: GrainService implementation with IGrainIdentity - configure_grain_service: ISiloHostBuilder ConfigureServices pattern * docs(orleans): update grainservices.md to use Orleans 3.x snippets Replace inline code blocks with :::code references: - DataService implementation -> snippets-v3/grainservices/GrainServices.cs id=data_service - ISiloHostBuilder config -> id=configure_grain_service * docs(orleans): add Orleans 3.x custom-storage snippet project Create buildable snippet project for custom grain storage examples: - custom-storage.csproj with Orleans 3.7.2, Newtonsoft.Json, and .NET 6.0 - FileGrainStorage.cs with region markers for class, methods, and lifecycle - FileGrainStorageOptions.cs for options class - FileGrainStorageFactory.cs for factory pattern - FileSiloBuilderExtensions.cs for ISiloHostBuilder extensions - Program.cs with silo configuration example * docs(orleans): update custom-grain-storage.md to use Orleans 3.x snippets * docs(orleans): add Orleans 3.x streams-quickstart snippet project * docs(orleans): update streams-quick-start.md to use Orleans 3.x snippets * docs(orleans): add Orleans 3.x client snippet project * docs(orleans): update client.md to use Orleans 3.x snippets * docs(orleans): convert 3 backtick refs to xref links in overview.md - ClientBuilder -> <xref:Orleans.ClientBuilder> - SiloHostBuilder -> <xref:Orleans.Hosting.SiloHostBuilder> - Guid -> <xref:System.Guid> * docs(orleans): convert 19 backtick refs to xref links in grains/index.md - Task, Task<T>, ValueTask<T>, TimeSpan, IAsyncEnumerable<T> - ResponseTimeoutAttribute, ResponseTimeout, TimeoutException - InconsistentStateException * docs(orleans): convert 4 backtick refs to xref links in quickstarts/ - ISiloBuilder, IGrainWithStringKey, Grain, IPersistentState * docs(orleans): convert 1 backtick ref to xref link in cluster-management.md - TimeSpan -> <xref:System.TimeSpan> * docs(orleans): batch convert 108 backtick refs to xrefs in grains/ directory Files updated: 16 - cancellation-tokens.md (16), index.md (29), timers-and-reminders.md (9) - grain-placement.md (8), interceptors.md (7), request-context.md (6) - request-scheduling.md (6), observers.md (5), transactions.md (5) - grain-lifecycle.md (4), event-sourcing-configuration.md (4), and more * docs(orleans): batch convert 24 backtick refs to xrefs in host/ directory Files updated: 7 - serialization-immutability.md (7), list-of-options-classes.md (6) - powershell-client.md (4), client.md (2), server-configuration.md (2) - index.md (2), silo-metadata.md (1) * docs(orleans): batch convert 17 backtick refs to xrefs in streaming/ * docs(orleans): batch convert 9 backtick refs to xrefs in implementation/ * docs(orleans): batch convert 25 backtick refs to xrefs in tutorials-and-samples/ * docs(orleans): batch convert 7 backtick refs to xrefs in deployment/ * docs(orleans): batch convert 18 backtick refs to xrefs in remaining files * docs(orleans): convert 31 additional backtick refs to xrefs (BCL types: ThreadPool, TaskScheduler, MemoryStream, etc.) * docs(orleans): convert 8 backtick refs to xrefs for Orleans 8+/9+/10+ types * fix(orleans): fix anchor links and markdown lint issues - Add explicit anchors for headings with xrefs to preserve existing links - Fix indented zone blocks in grainservices.md (MD046 code-block-style) * Convert method references to xrefs Convert 14 Orleans method backtick references to xref links: - UseOrleans() -> <xref:Orleans.Hosting.GenericHostExtensions.UseOrleans*> - UseOrleansClient() -> <xref:Orleans.Hosting.ClientBuilderExtensions.UseOrleansClient*> - ReadStateAsync() -> <xref:Orleans.Grain%601.ReadStateAsync*> - WriteStateAsync() -> <xref:Orleans.Grain%601.WriteStateAsync*> Files updated: - overview.md - docker-deployment.md - aspire-integration.md - server-configuration.md - client-configuration.md - grain-persistence/index.md * Convert property references to xrefs Convert 46 Orleans property backtick references to xref links: - ClusterId -> <xref:Orleans.Configuration.ClusterOptions.ClusterId> - ServiceId -> <xref:Orleans.Configuration.ClusterOptions.ServiceId> - SiloPort -> <xref:Orleans.Configuration.EndpointOptions.SiloPort> - GatewayPort -> <xref:Orleans.Configuration.EndpointOptions.GatewayPort> - State -> <xref:Orleans.Grain%601.State> Files updated: 12 files across configuration, deployment, tutorials, and grains sections * Convert additional method references to xrefs (66 conversions) * Fix UseOrleans and UseOrleansClient xref UIDs Changed incorrect Orleans.Hosting.* namespace xrefs to correct Microsoft.Extensions.Hosting.* namespace UIDs: - Orleans.Hosting.GenericHostExtensions.UseOrleans* -> Microsoft.Extensions.Hosting.GenericHostExtensions.UseOrleans* - Orleans.Hosting.ClientBuilderExtensions.UseOrleansClient* -> Microsoft.Extensions.Hosting.OrleansClientGenericHostExtensions.UseOrleansClient* This fixes 8 build warnings for invalid xref UIDs. * Fix streaming API xref UIDs Changed incorrect IAsyncStream<T> xrefs to correct interface types: - IAsyncStream<T>.SubscribeAsync* -> IAsyncObservable<T>.SubscribeAsync* (SubscribeAsync is defined on IAsyncObservable<T>, not IAsyncStream<T>) - IAsyncStream<T>.OnNextAsync* -> IAsyncObserver<T>.OnNextAsync* (OnNextAsync is defined on IAsyncObserver<T>, not IAsyncStream<T>) This fixes 10 build warnings for invalid xref UIDs in streaming docs. * Improve xref formatting for extension methods - Add xref for AddMemoryGrainStorage in build-your-first-orleans-app.md - Remove displayProperty=nameWithType from extension method xrefs so they display just the method name instead of ClassName.MethodName - Use * suffix instead of %2A for consistency Extension methods should display as just their method name (e.g., GetPrimaryKey) rather than the full path (e.g., GrainExtensions.GetPrimaryKey) since users call them directly on the target object. * Fix xref UIDs and move resource-optimized placement to top - Fix GrainCallFilterSiloBuilderExtensions xref UID in interceptors.md - Fix AzureStorageReminderSiloBuilderExtensions xref UID in timers-and-reminders.md - Move Resource-optimized placement section to top of placement strategies - Add '(default)' to Resource-optimized placement heading - Update note to clarify it's the default in Orleans 9.2+ * Add missing xrefs in timers-and-reminders.md and observers.md timers-and-reminders.md: - Convert GrainTimerCreationOptions properties to xrefs (DueTime, Period, Interleave, KeepAlive) - Add xrefs for RegisterGrainTimer, IGrainTimer.Change, CancellationToken - Add parameter descriptions with xrefs for callback signature observers.md: - Add xrefs for CreateObjectReference method - Use display text with xref links for ObserverManager<IChat> - Add xref for Notify method * Add missing xrefs in cancellation-tokens.md * Add consistent xrefs in request-context.md * Remove PowerShell client module from TOC * Add zone pivots for Orleans 8.0, 9.0, 10.0 to grain persistence and code generation pages * Fix broken anchor in cancellation-tokens.md * Add zone pivots for Orleans 8.0, 9.0, 10.0 to grainservices page * Add missing xrefs in transactions.md and fix IHostBuilder to IHostApplicationBuilder * Add zone pivots and grain migration documentation to grain-lifecycle.md * Fix broken anchor by removing xref from heading in cancellation-tokens.md * Fix bookmark anchor and IGrainMigrationParticipant xref namespace * Simplify heading and anchor link for WithCancellation section
1 parent c70ff29 commit 6880d3f

183 files changed

Lines changed: 9136 additions & 2143 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.markdownlint-cli2.jsonc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"code_blocks": false,
4949
"names": [
5050
"ASP.NET",
51-
"PowerShell",
52-
"Orleans"
51+
"PowerShell"
5352
]
5453
},
5554
"MD046": {

docs/orleans/Directory.Build.props

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project>
2+
<!-- Centralized build properties for Orleans 10.x snippet projects -->
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<!-- Disable SourceLink for git worktree compatibility -->
8+
<EnableSourceLink>false</EnableSourceLink>
9+
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
10+
<!-- Suppress warnings for unused code in snippets -->
11+
<NoWarn>$(NoWarn);CS0168;CS0219;CS8618</NoWarn>
12+
</PropertyGroup>
13+
14+
<!-- Centralized package versions for Orleans 10.x -->
15+
<ItemGroup>
16+
<PackageReference Update="Microsoft.Orleans.Sdk" Version="10.0.0" />
17+
<PackageReference Update="Microsoft.Orleans.Server" Version="10.0.0" />
18+
<PackageReference Update="Microsoft.Orleans.Client" Version="10.0.0" />
19+
<PackageReference Update="Microsoft.Extensions.Hosting" Version="10.0.0" />
20+
<PackageReference Update="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
21+
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
22+
</ItemGroup>
23+
</Project>

docs/orleans/dashboard/index.md

Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
---
2+
title: Orleans Dashboard
3+
description: Learn how to use the Orleans Dashboard for real-time monitoring of your Orleans cluster, silos, and grains.
4+
ms.date: 01/20/2026
5+
ms.topic: conceptual
6+
zone_pivot_groups: orleans-version
7+
---
8+
9+
# Orleans Dashboard
10+
11+
:::zone target="docs" pivot="orleans-10-0"
12+
13+
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.
14+
15+
[!INCLUDE [orleans-10-preview](../includes/orleans-10-preview.md)]
16+
17+
## Features
18+
19+
The Orleans Dashboard provides the following capabilities:
20+
21+
- **Cluster overview**: View all silos in the cluster with their status, uptime, and resource utilization.
22+
- **Grain monitoring**: Track grain activations, method calls, and performance metrics per grain type.
23+
- **Method profiling**: Analyze grain method call frequency, latency, and error rates.
24+
- **Reminder management**: Browse and monitor all registered reminders across the cluster.
25+
- **Live log streaming**: View real-time log output from the cluster.
26+
- **Silo details**: Inspect individual silo properties, counters, and grain distributions.
27+
- **Grain state inspection**: View the current state of individual grain instances.
28+
29+
## Installation
30+
31+
The Orleans Dashboard is distributed in two NuGet packages:
32+
33+
| Package | Description |
34+
|---------|-------------|
35+
| [Microsoft.Orleans.Dashboard](https://www.nuget.org/packages/Microsoft.Orleans.Dashboard) | Main dashboard package with UI and API endpoints |
36+
| [Microsoft.Orleans.Dashboard.Abstractions](https://www.nuget.org/packages/Microsoft.Orleans.Dashboard.Abstractions) | Abstractions for dashboard integration (e.g., `NoProfilingAttribute`) |
37+
38+
### Basic setup
39+
40+
To add the Orleans Dashboard to your application, call `AddDashboard()` on your silo builder and `MapOrleansDashboard()` to map the dashboard endpoints:
41+
42+
```csharp
43+
using Orleans.Dashboard;
44+
45+
var builder = WebApplication.CreateBuilder(args);
46+
47+
// Configure Orleans with the dashboard
48+
builder.UseOrleans(siloBuilder =>
49+
{
50+
siloBuilder.UseLocalhostClustering();
51+
siloBuilder.AddMemoryGrainStorageAsDefault();
52+
53+
// Add the dashboard services
54+
siloBuilder.AddDashboard();
55+
});
56+
57+
var app = builder.Build();
58+
59+
// Map dashboard endpoints at the root path
60+
app.MapOrleansDashboard();
61+
62+
app.Run();
63+
```
64+
65+
After starting your application, navigate to `http://localhost:5000/` (or your configured URL) to access the dashboard.
66+
67+
### Custom route prefix
68+
69+
You can host the dashboard at a custom path by specifying a route prefix:
70+
71+
```csharp
72+
// Map dashboard endpoints at /dashboard
73+
app.MapOrleansDashboard(routePrefix: "/dashboard");
74+
```
75+
76+
With this configuration, access the dashboard at `http://localhost:5000/dashboard/`.
77+
78+
## Configuration
79+
80+
### Dashboard options
81+
82+
Configure dashboard behavior using `DashboardOptions`:
83+
84+
```csharp
85+
siloBuilder.AddDashboard(options =>
86+
{
87+
// Disable the live log streaming endpoint
88+
options.HideTrace = true;
89+
90+
// Set the counter update interval (minimum 1000ms)
91+
options.CounterUpdateIntervalMs = 2000;
92+
93+
// Set the history buffer length for metrics
94+
options.HistoryLength = 200;
95+
});
96+
```
97+
98+
| Option | Type | Default | Description |
99+
|--------|------|---------|-------------|
100+
| `HideTrace` | `bool` | `false` | When `true`, disables the live log streaming endpoint. |
101+
| `CounterUpdateIntervalMs` | `int` | `1000` | Milliseconds between counter samples. Must be >= 1000. |
102+
| `HistoryLength` | `int` | `100` | Number of historical data points to maintain for metrics. |
103+
104+
### Grain profiler options
105+
106+
The grain profiler collects method-level performance data. Configure it using `GrainProfilerOptions`:
107+
108+
```csharp
109+
builder.Services.Configure<GrainProfilerOptions>(options =>
110+
{
111+
// Always collect profiling data, even when dashboard is inactive
112+
options.TraceAlways = true;
113+
114+
// Time after which profiling stops if dashboard is inactive
115+
options.DeactivationTime = TimeSpan.FromMinutes(5);
116+
});
117+
```
118+
119+
| Option | Type | Default | Description |
120+
|--------|------|---------|-------------|
121+
| `TraceAlways` | `bool` | `false` | When `true`, profiling data is continuously collected even when the dashboard is not being queried. |
122+
| `DeactivationTime` | <xref:System.TimeSpan> | 1 minute | Duration of inactivity after which profiling automatically stops. Only applies when `TraceAlways` is `false`. |
123+
124+
### Excluding grains from profiling
125+
126+
Use the `[NoProfiling]` attribute to exclude specific grains from performance profiling:
127+
128+
```csharp
129+
using Orleans.Dashboard;
130+
131+
[NoProfiling]
132+
public class HighFrequencyGrain : Grain, IHighFrequencyGrain
133+
{
134+
// This grain won't be included in profiling data
135+
}
136+
```
137+
138+
## Deployment patterns
139+
140+
### Co-hosted with silo (recommended)
141+
142+
The simplest deployment pattern is to host the dashboard directly with your Orleans silo. This is the recommended approach for most scenarios:
143+
144+
```csharp
145+
using Orleans.Dashboard;
146+
147+
var builder = WebApplication.CreateBuilder(args);
148+
149+
builder.UseOrleans(siloBuilder =>
150+
{
151+
siloBuilder.UseLocalhostClustering();
152+
siloBuilder.UseInMemoryReminderService();
153+
siloBuilder.AddMemoryGrainStorageAsDefault();
154+
siloBuilder.AddDashboard();
155+
});
156+
157+
var app = builder.Build();
158+
159+
app.MapOrleansDashboard();
160+
161+
app.Run();
162+
```
163+
164+
### Separate dashboard host
165+
166+
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:
167+
168+
```csharp
169+
using Orleans.Configuration;
170+
using Orleans.Dashboard;
171+
using System.Net;
172+
173+
// Start the silo host
174+
var siloHostBuilder = Host.CreateApplicationBuilder(args);
175+
siloHostBuilder.UseOrleans(builder =>
176+
{
177+
builder.UseDevelopmentClustering(options =>
178+
options.PrimarySiloEndpoint = new IPEndPoint(IPAddress.Loopback, 11111));
179+
builder.UseInMemoryReminderService();
180+
builder.AddMemoryGrainStorageAsDefault();
181+
builder.ConfigureEndpoints(IPAddress.Loopback, 11111, 30000);
182+
183+
// Dashboard must also be added to silos
184+
builder.AddDashboard();
185+
});
186+
using var siloHost = siloHostBuilder.Build();
187+
await siloHost.StartAsync();
188+
189+
// Create a separate web application for the dashboard
190+
var dashboardBuilder = WebApplication.CreateBuilder(args);
191+
192+
// Configure Orleans client
193+
dashboardBuilder.UseOrleansClient(clientBuilder =>
194+
{
195+
clientBuilder.UseStaticClustering(options =>
196+
options.Gateways.Add(new IPEndPoint(IPAddress.Loopback, 30000).ToGatewayUri()));
197+
198+
// Add dashboard services to the client
199+
clientBuilder.AddDashboard();
200+
});
201+
202+
var dashboardApp = dashboardBuilder.Build();
203+
204+
// Map dashboard endpoints on the client
205+
dashboardApp.MapOrleansDashboard();
206+
207+
await dashboardApp.RunAsync();
208+
209+
await siloHost.StopAsync();
210+
```
211+
212+
> [!IMPORTANT]
213+
> When using a separate dashboard host, you must still call `AddDashboard()` on the silo builder. The silos need the dashboard services to collect and provide metrics data.
214+
215+
## Authorization
216+
217+
The dashboard endpoints support ASP.NET Core authorization. Use the `RequireAuthorization()` extension method to protect access:
218+
219+
```csharp
220+
// Require authentication for dashboard access
221+
app.MapOrleansDashboard()
222+
.RequireAuthorization();
223+
```
224+
225+
You can also apply specific authorization policies:
226+
227+
```csharp
228+
// Configure authorization
229+
builder.Services.AddAuthorization(options =>
230+
{
231+
options.AddPolicy("DashboardAccess", policy =>
232+
policy.RequireRole("Admin", "Operator"));
233+
});
234+
235+
builder.Services.AddAuthentication(/* your auth configuration */);
236+
237+
var app = builder.Build();
238+
239+
app.UseAuthentication();
240+
app.UseAuthorization();
241+
242+
// Apply the policy to dashboard endpoints
243+
app.MapOrleansDashboard()
244+
.RequireAuthorization("DashboardAccess");
245+
```
246+
247+
## Troubleshooting
248+
249+
### Dashboard shows "lost connectivity" message
250+
251+
This error occurs when the dashboard cannot communicate with the Orleans cluster. Common causes:
252+
253+
1. **Silo not started**: Ensure your Orleans silo is running before accessing the dashboard.
254+
2. **Network issues**: Verify network connectivity between the dashboard host and silos.
255+
3. **Cluster misconfiguration**: Check that clustering is properly configured.
256+
257+
### Profiling data not appearing
258+
259+
If grain method profiling data is empty:
260+
261+
1. **Make grain calls**: Profiling only shows data after grain methods are invoked.
262+
2. **Check `TraceAlways`**: By default, profiling stops after 1 minute of dashboard inactivity. Set `TraceAlways = true` for continuous profiling.
263+
3. **Check `[NoProfiling]`**: Ensure the grain isn't marked with the `[NoProfiling]` attribute.
264+
265+
### Live trace endpoint is disabled
266+
267+
If the `/Trace` endpoint returns 403 Forbidden:
268+
269+
- Check that `DashboardOptions.HideTrace` is not set to `true`.
270+
271+
## See also
272+
273+
- [Observability in Orleans](../host/monitoring/index.md)
274+
- [NuGet packages](../resources/nuget-packages.md)
275+
276+
:::zone-end
277+
278+
:::zone target="docs" pivot="orleans-9-0,orleans-8-0,orleans-7-0,orleans-3-x"
279+
280+
The Orleans Dashboard is a built-in monitoring tool introduced in Orleans 10.0. For earlier versions, consider using:
281+
282+
- **[OrleansDashboard (community)](https://github.com/OrleansContrib/OrleansDashboard)**: A community-maintained dashboard for Orleans 3.x through 8.x.
283+
- **OpenTelemetry integration**: Built-in observability features available in Orleans 7.0 and later. See [Observability in Orleans](../host/monitoring/index.md).
284+
285+
:::zone-end

docs/orleans/deployment/deploy-to-azure-app-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Orleans is a reliable and scalable framework for building distributed applicatio
5757
The preceding diagram shows that the client is the server-side Blazor app. It's composed of several services that consume a corresponding Orleans grain. Each service pairs with an Orleans grain as follows:
5858

5959
- `InventoryService`: Consumes the `IInventoryGrain` where inventory is partitioned by product category.
60-
- `ProductService`: Consumes the `IProductGrain` where a single product is tethered to a single grain instance by `Id`.
60+
- `ProductService`: Consumes the `IProductGrain` where a single product is tethered to a single grain instance by <xref:Orleans.IdAttribute>.
6161
- `ShoppingCartService`: Consumes the `IShoppingCartGrain` where a single user only has a single shopping cart instance regardless of consuming clients.
6262

6363
The solution contains three projects:
@@ -138,7 +138,7 @@ Once you configure Azure App Service with virtual network (VNet) integration and
138138
- Which IP address other hosts in your virtual network can use to contact a given app instance; and
139139
- Which ports on that IP address will be routed to that app instance
140140

141-
The `WEBSITE_PRIVATE_IP` variable specifies an IP routable from the VNet, but not necessarily an IP address the app instance can directly bind to. For this reason, instruct the host to bind to all internal addresses by passing `listenOnAnyHostAddress: true` to the `ConfigureEndpoints` method call. The following example configures an `ISiloBuilder` instance to consume the injected environment variables and listen on the correct interfaces:
141+
The `WEBSITE_PRIVATE_IP` variable specifies an IP routable from the VNet, but not necessarily an IP address the app instance can directly bind to. For this reason, instruct the host to bind to all internal addresses by passing `listenOnAnyHostAddress: true` to the `ConfigureEndpoints` method call. The following example configures an <xref:Orleans.Hosting.ISiloBuilder> instance to consume the injected environment variables and listen on the correct interfaces:
142142

143143
```csharp
144144
var endpointAddress = IPAddress.Parse(builder.Configuration["WEBSITE_PRIVATE_IP"]!);

0 commit comments

Comments
 (0)