aspire-service-defaults

Create and distribute shared Aspire ServiceDefaults configuration across services.

1.1k|101|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill aspire-service-defaults
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-service-defaults
Source: https://github.com/Aaronontheweb/dotnet-skills/tree/main/skills/aspire-service-defaults
Command: npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill aspire-service-defaults

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a centralized ServiceDefaults project for Aspire applications to standardize OpenTelemetry, health checks, resilience, and service discovery across all services.

Core Features & Use Cases

  • Centralized observability: consistent OpenTelemetry configuration across API, Worker, and AppHost projects.
  • Unified health checks: shared readiness and liveness endpoints to streamline monitoring.
  • HTTP resilience: built-in retry and circuit-breaker policies via AddServiceDefaults.
  • Service discovery integration: seamless cross-service address resolution in a distributed Aspire environment.

Quick Start

Use aspire-service-defaults to initialize a shared ServiceDefaults project and apply AddServiceDefaults across your API, Worker, and AppHost services.

Frequently Asked Questions about aspire-service-defaults

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure OpenTelemetry across multiple .NET Aspire services?

You can centralize OpenTelemetry configuration across .NET Aspire services by creating a shared ServiceDefaults project that applies consistent OTLP exporter setup, health checks, and resilience policies to all API, Worker, and AppHost projects.

What is the AddServiceDefaults pattern in .NET Aspire distributed applications?

The AddServiceDefaults pattern in .NET Aspire is a shared configuration method that enforces unified OpenTelemetry observability, service discovery, HTTP resilience, and health check endpoints across distributed API, Worker, and AppHost services.

How do I set up shared health checks and liveness endpoints for Aspire API and Worker services?

Shared health checks for Aspire API and Worker services are set up by distributing a centralized ServiceDefaults configuration that calls MapDefaultEndpoints, ensuring consistent readiness and liveness monitoring across all distributed services.

Does .NET Aspire ServiceDefaults support service discovery and HTTP resilience out of the box?

Yes, the .NET Aspire ServiceDefaults setup supports service discovery and HTTP resilience by integrating cross-service address resolution and built-in retry with circuit-breaker policies automatically through the AddServiceDefaults extension method.

What's the best way to standardize observability and OTLP exporter configuration in Aspire?

The best way to standardize observability and OTLP exporter configuration in Aspire is to automate a shared ServiceDefaults project that enforces consistent OpenTelemetry setup across all distributed API, Worker, and AppHost services.