aspire-service-defaults

Centralize OpenTelemetry, health checks, resilience, and service discovery in .NET Aspire projects.

Updated Dec 4, 2022
One-click install
npx skills add https://github.com/devingoble/CloudOStat --skill aspire-service-defaults-devingoble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-service-defaults
Source: https://github.com/devingoble/CloudOStat/tree/main/.github/skills/aspire-service-defaults
Command: npx skills add https://github.com/devingoble/CloudOStat --skill aspire-service-defaults-devingoble

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill centralizes and standardizes essential cross-cutting concerns for .NET Aspire microservices, ensuring consistency in observability, resilience, and service discovery across all services.

Core Features & Use Cases

  • Unified Observability: Integrates OpenTelemetry for logging, tracing, and metrics.
  • Resilience & Discovery: Configures HTTP client resilience (retries, circuit breakers) and service discovery.
  • Health Checks: Provides standardized health and liveness endpoints.
  • Use Case: When building a new microservice within a .NET Aspire application, use this skill to automatically add robust OpenTelemetry instrumentation, health checks, and resilient HTTP client configurations with a single call.

Quick Start

Add service defaults to your host builder by calling builder.AddServiceDefaults().

Frequently Asked Questions about aspire-service-defaults

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

FAQPage Schema
How do I standardize OpenTelemetry and health checks across .NET Aspire microservices?

To standardize OpenTelemetry and health checks across .NET Aspire microservices, use a shared service defaults project. It centralizes observability and resilience configurations, ensuring consistent operational readiness by calling builder.AddServiceDefaults() during host setup.

How do I configure HTTP client resilience and service discovery in Aspire?

Configuring HTTP client resilience and service discovery in Aspire is handled by adding service defaults to your application. This automatically sets up retries, circuit breakers, and robust inter-service communication for distributed systems.

What is the best way to bootstrap a new microservice with consistent observability in .NET Aspire?

The best way to bootstrap a new microservice with consistent observability in .NET Aspire is using a centralized service defaults project. It integrates OpenTelemetry for logging, tracing, and metrics with a single configuration call.

Do I need a shared project to manage cross-cutting concerns for Aspire service defaults?

A shared project is needed to manage cross-cutting concerns for Aspire service defaults effectively. It provides unified observability, standardized health and liveness endpoints, and resilient HTTP client configurations across all services.

Can I use service defaults to centralize logging, tracing, and metrics in distributed systems?

Yes, you can use service defaults to centralize logging, tracing, and metrics in distributed systems. It integrates OpenTelemetry directly into your .NET Aspire applications to provide unified observability across all microservices.

What specific problem does centralizing Aspire service configuration solve?

Centralizing Aspire service configuration solves the problem of inconsistent observability, resilience, and service discovery across microservices. It ensures all services share standardized health checks, OpenTelemetry instrumentation, and robust communication configurations.