aaronontheweb/dotnet-skills/aspire-service-defaults
- community
Checking that the SKILL.md file is still in the repository.
Create a shared ServiceDefaults project for Aspire applications. Centralizes OpenTelemetry, health checks, resilience, and service discovery configuration across all services.
Install
npx vskill@latest install aaronontheweb/dotnet-skills/aspire-service-defaultsSKILL.md
Aspire Service Defaults
When to Use This Skill
Use this skill when:
- Building Aspire-based distributed applications
- Need consistent observability (logging, tracing, metrics) across services
- Want shared health check configuration
- Configuring HttpClient resilience and service discovery
What is ServiceDefaults?
ServiceDefaults is a shared project that provides common configuration for all services in an Aspire application:
- OpenTelemetry - Logging, tracing, and metrics
- Health Checks - Readiness and liveness endpoints
- Service Discovery - Automatic service resolution
- HTTP Resilience - Retry and circuit breaker policies
Every service references this project and calls AddServiceDefaults().
Project Structure
ServiceDefaults Project
Project File
Extensions.cs
Usage in Services
API Service
Worker Service
Adding Custom Health Checks
Adding Custom Trace Sources
For Akka.NET or custom ActivitySources:
Production Health Checks
For production, protect health endpoints or use different paths:
Integration with AppHost
The AppHost automatically configures OTLP endpoints:
Services receive OTEL_EXPORTER_OTLP_ENDPOINT automatically, sending telemetry to the Aspire Dashboard.
Best Practices
| Practice | Reason | |
|---|---|---|
| One ServiceDefaults project | Consistent config across all services | |
| Filter health checks from traces | Reduces noise in observability data | |
| Tag health checks | Separate liveness from readiness | |
| Use StandardResilienceHandler | Built-in retry, circuit breaker, timeout | |
| Add custom trace sources | Capture domain-specific spans |
Resources
- Aspire Service Defaults: https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/service-defaults
- OpenTelemetry .NET: https://opentelemetry.io/docs/languages/net/
- Health Checks: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aspire-service-defaults/SKILL.md
Popularity
- Repository stars
- 681
- Repository forks
- 66
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aaronontheweb/dotnet-skills/aspire-service-defaults)