This repository provides streamlined hosting extensions for .NET applications, offering simplified configuration and dependency injection setup for building robust, distributed applications. It provides opinionated defaults and convenient extension methods for integrating popular services like Temporal.io, Orleans, and OpenTelemetry.
- Simplified Temporal.io integration with hosting-friendly client and worker configuration.
- Orleans clustering, persistence, and streaming setup (including NATS integration).
- Service Defaults including OpenTelemetry (Metrics, Tracing, Logging), Health Checks, and Service Discovery.
- UserSecrets management for local development.
- Production-ready defaults for common use cases.
- Language: C# 14
- Framework: .NET 10 (ASP.NET Core)
- Package Manager: NuGet with Central Package Management (CPM)
- Key Libraries: Orleans, Temporal.io, OpenTelemetry, Polly (Resilience)
src/Orleans: Extensions for Microsoft Orleans.src/Temporalio: Extensions for Temporal.io SDK.src/ServiceDefaults: Shared defaults for OpenTelemetry, Health Checks, and Service Discovery.src/UserSecrets: Extensions for working with .NET User Secrets.
Install the desired package via NuGet:
dotnet add package Escendit.Extensions.Hosting.Orleans
# OR
dotnet add package Escendit.Extensions.Hosting.TemporalioIn your Program.cs:
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder(args);
builder.AddServiceDefaults(); // Configures OTEL, Health Checks, etc.
var app = builder.Build();
app.Run();- Build:
dotnet build - Test:
dotnet test(TODO: Add tests to the project) - Pack:
dotnet pack
OTEL_EXPORTER_OTLP_ENDPOINT: Endpoint for OpenTelemetry OTLP exporter.ASPNETCORE_ENVIRONMENT: Used to determine environment-specific configurations.
Licensed to the Escendit GmbH under one or more agreements. The Escendit GmbH licenses this file to you under the Apache License 2.0. See the LICENSE file for more information.