SkillsReviewed · Aaronontheweb

Aspire Service Defaults

Aspire Service Defaults is an assistant skill for .NET developers building Aspire applications, but its examples leave package versions and production health endpoint protection unresolved. It explains how to share OpenTelemetry, health checks, service discovery and HTTP resilience configuration through a common C# project.

Researched 16 Nov 2026

In short.

Aspire Service Defaults is an assistant skill for developers configuring Aspire services, but its sample code requires dependency choices and production health endpoint configuration. It demonstrates a shared project with AddServiceDefaults() for telemetry, service discovery and HTTP resilience, plus MapDefaultEndpoints() for web health probes. The project targets net9.0, enables OTLP export when an endpoint is configured, and exposes its default health endpoints only in development. Compilation, runtime behaviour and assistant compatibility are unverified.

Researched and written by an AI model and checked by a second AI model. How it works

The supplied evidence covers the complete selected folder through skills/aspire-service-defaults/SKILL.md and includes the repository root LICENSE as an accompanying notice outside that folder. Project files and Extensions.cs appear as examples inside SKILL.md, not as separate captured files. The wider repository, third-party dependencies and linked documentation are outside this coverage. Compilation, assistant loading, runtime behaviour and production readiness remain unverified.

The overview

Identity

Aspire Service Defaults is the skill at skills/aspire-service-defaults in Aaronontheweb/dotnet-skills. The supplied folder contains a SKILL.md document with assistant instructions and embedded XML and C# examples for creating a shared ServiceDefaults project.

Its metadata names it aspire-service-defaults and declares user-invocable: false. The supplied material does not explain how a particular assistant discovers, loads or invokes it.

Assessment

Its practical value is the concrete connection between a shared project and the services consuming it: project references, extension methods, API and worker examples, and optional health and tracing customizations. This makes it a useful starting point for developers seeking consistent configuration across several services.

The document leaves integration work to the developer. Package versions are unspecified, optional database health checks need additional dependencies, and the production health endpoint example does not implement access protection. No build or runtime results establish that the examples work together unchanged.

Who it is for

The intended users are developers building Aspire applications with multiple services and wanting shared logging, tracing, metrics, health checks and outbound HTTP configuration. It includes both ASP.NET Core API hosting and non-web worker hosting.

Beginners receive a project layout and call-site examples, but will still need help with project references, package management and deployment configuration. Experienced developers can adapt the extension methods, health check registrations and ActivitySource subscriptions.

Capabilities

The examples configure OpenTelemetry logging, ASP.NET Core and HTTP client tracing, and ASP.NET Core, HTTP client and runtime metrics. They exclude /health and /alive requests from ASP.NET Core tracing and enable OTLP export when OTEL_EXPORTER_OTLP_ENDPOINT is nonblank.

Other examples register service discovery, apply the standard HTTP resilience handler, distinguish readiness and liveness endpoints, add PostgreSQL and Redis health checks, and subscribe to Akka.NET or application ActivitySources. These are documented configuration patterns; their behaviour has not been demonstrated by execution results.

Using it

Requirements

The shared project example uses Microsoft.NET.Sdk, targets net9.0, sets IsAspireSharedProject to true and references Microsoft.AspNetCore.App. Its package references include Microsoft.Extensions.Http.Resilience, Microsoft.Extensions.ServiceDiscovery and OpenTelemetry packages for OTLP export, hosting, ASP.NET Core, HTTP and runtime instrumentation.

Package versions, an SDK version and any central package version configuration are not supplied. The optional AddNpgSql and AddRedis registrations require dependencies that are not listed in the project example. MyWorker and MyCustomHealthCheck also require application implementations.

A compatible assistant is needed to use the document as a skill, but supported hosts, model requirements and installation conventions are unknown.

How it works

Each service references the shared project and calls AddServiceDefaults(). That extension accepts an IHostApplicationBuilder, registers telemetry and health checks, adds service discovery, and configures default HTTP clients with AddStandardResilienceHandler() and AddServiceDiscovery().

Web applications separately call MapDefaultEndpoints(). In the main example, /health runs all registered checks, while /alive runs checks tagged live. Both routes are mapped only in development. The initial self check always reports healthy, so dependency readiness requires additional checks.

The AppHost example connects an API to PostgreSQL and Redis through WithReference(). The accompanying text says Aspire supplies the OTLP endpoint for dashboard telemetry; no runtime evidence confirms that integration.

Setup

The documented application setup starts with a shared ServiceDefaults project containing the project file and Extensions.cs. Services reference that project and call builder.AddServiceDefaults() before building their host. An API also calls app.MapDefaultEndpoints().

Before using the examples, resolve package versions, supply application classes and connection strings, and decide which health checks represent readiness. Configure an OTLP destination if telemetry export is required, and choose how production probes will reach protected health endpoints.

The document does not provide assistant installation commands or a compatibility matrix. Loading the skill into a particular assistant remains unspecified.

Example

In the supplied API example, builder.AddServiceDefaults() runs before builder.Build(), and app.MapDefaultEndpoints() is called before app.MapControllers(). With the main endpoint implementation, the API is configured to expose /health and /alive only in development.

The worker example uses Host.CreateApplicationBuilder(args), calls AddServiceDefaults(), registers MyWorker through AddHostedService<MyWorker>(), and runs the host. It does not map HTTP health endpoints. These examples describe intended configuration; they are not execution results.

Assessment & evidence

Limitations

The main endpoint implementation exposes no health routes outside development. The separate production example maps the routes and returns status text, but leaves internal ports, authorization and rate limiting as considerations rather than implemented controls.

The baseline self check cannot establish database or cache readiness. Those dependencies need additional checks. Worker services receive health check registration but no HTTP endpoint through the worker example.

Package versions and exact resilience policy settings are absent, so retry counts, timeout values and circuit breaker behaviour are not established here. Build compatibility, telemetry delivery, service resolution and production operation remain unverified.

Design rationale

A shared extension gives participating services one place to change common configuration. This can reduce configuration drift when each service references the project and calls the extension consistently.

Filtering health probe requests from tracing is intended to reduce telemetry noise. Health check tags separate process liveness from broader readiness checks, while conditional OTLP export makes export depend on an explicitly configured destination.

Applying resilience through default HTTP client configuration gives the setting broad reach. Developers should review whether its retry behaviour suits operations that change state; the document does not examine those application semantics.

Alternatives and further reading

For direct framework guidance, the skill points to Microsoft's Aspire Service Defaults documentation [https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/service-defaults] and ASP.NET Core health check documentation [https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks]. It also links to OpenTelemetry .NET documentation [https://opentelemetry.io/docs/languages/net/].

Those linked pages are not included in the supplied evidence, so their current contents and any differences from this skill are not assessed. No comparative evidence establishes that another skill or implementation is better.

Source evidence

The original skill document is available at the pinned revision: [https://raw.githubusercontent.com/Aaronontheweb/dotnet-skills/5ca5db8cf25566f19d2a5dc53204d4af22b23a0d/skills/aspire-service-defaults/SKILL.md]. It contains the metadata, project layout, source examples and explanatory guidance supporting this report.

The accompanying root LICENSE establishes the supplied resource's MIT terms. Neither file supplies build output, runtime observations, benchmarks or assistant invocation results. Code execution and operational behaviour are unverified.

Access & freshness

Costs

No price, subscription requirement or operating-cost figures are supplied. Assistant access, service hosting, telemetry collection and telemetry storage costs are unknown.

The evidence provides no measurements of CPU, memory, network traffic, storage volume or implementation effort. It does not support a total-cost estimate.

Rights

The accompanying repository LICENSE is the MIT License, with copyright attributed to Aaron Stannard in 2025. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.

The licence disclaims warranties and liability. Licence terms for third-party dependencies are not supplied by this notice. Original notice: [https://raw.githubusercontent.com/Aaronontheweb/dotnet-skills/5ca5db8cf25566f19d2a5dc53204d4af22b23a0d/LICENSE].

Freshness

The supplied source is pinned to commit 5ca5db8cf25566f19d2a5dc53204d4af22b23a0d and was captured on 2026-11-16. That capture date does not establish when the skill was last edited.

The example targets net9.0 but supplies no Aspire or package versions. Later repository changes, compatibility with other releases and current platform support are unknown from this evidence.

Before adoption

Resolve the target framework and package versions, then restore and build a small consuming API and worker. Confirm how the intended assistant loads the skill and interprets its user-invocable setting.

Verify telemetry delivery to the chosen OTLP destination, service-name resolution and outbound HTTP resilience behaviour. Review retries for operations that change state.

Add checks for dependencies that determine readiness, verify the live-tag filter, and configure production probe access. Confirm that health routes are reachable in the deployment environment and protected as intended. These validations remain outstanding.

Evidence for this report

LICENSEnotice · checked 2026-11-16
skills/aspire-service-defaults/SKILL.mdselected · checked 2026-11-16