Repository navigation
GH-5124 Aspire samples on Aspire 13.6.3 with shared service defaults, in wolverine.slnx - #5182
Merged
Merged
Conversation
… in wolverine.slnx
- AspireWithRabbitMq and AspireWithKafka AppHosts move from Aspire.AppHost.Sdk 9.1.0 to 13.6.3
(Aspire.Hosting.RabbitMQ/Kafka pinned centrally in Directory.Packages.props); the old
PackageReference Version= attributes could not restore under central package management
- New src/Samples/AspireServiceDefaults: OpenTelemetry with AddSource("Wolverine") and
AddMeter("Wolverine*"), OTLP export when Aspire sets OTEL_EXPORTER_OTLP_ENDPOINT, and
/health + /alive endpoints; the four sample services use it and the AppHosts poll /health
- Sample services are now web apps (needed for the health endpoints) and reference
Wolverine.RuntimeCompilation, without which they failed at startup
- Fixed latent sample bugs the build/run exposed: Ponger missed a using, and the hosted services
took the scoped IMessageBus into a singleton (fails scope validation in Development)
- All eight projects are net9.0 and in wolverine.slnx, so the pinned net9.0 Compile builds them
- docs/guide/aspire.md: startup gates are cloned project resources the service waits on with
WaitForCompletion, not child processes; only the dashboard buttons spawn a child process.
New section on traces, metrics and health checks using the service defaults sample
Closes #5124
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
Merged
This was referenced Oct 25, 2026
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Aspire.Hosting.AppHostships net8.0/net9.0/net10.0 assets) for bothsrc/Samples/AspireWithRabbitMqandsrc/Samples/AspireWithKafka. The AppHosts use<Project Sdk="Aspire.AppHost.Sdk/13.6.3">;Aspire.Hosting.RabbitMQ/Aspire.Hosting.Kafkaare pinned inDirectory.Packages.props. The oldPackageReference Version="9.1.0"could not even restore under central package management.ASPIRE010(no Aspire CLI bundle) is suppressed in the AppHosts, since they run withdotnet runon the dashboard/DCP packages the SDK references.src/Samples/AspireServiceDefaults, shared by all four services: OpenTelemetry withAddSource("Wolverine")andAddMeter("Wolverine*"), OTLP export when Aspire setsOTEL_EXPORTER_OTLP_ENDPOINT, and/health+/alive. The services callAddServiceDefaults()/MapDefaultEndpoints(); the AppHosts addWithHttpHealthCheck("/health"). The services already usedUseRabbitMqUsingNamedConnection/UseKafkaUsingNamedConnection.Microsoft.NET.Sdk.Webapps (needed for the health endpoints) with launch profiles, and referenceWolverine.RuntimeCompilation. Without it they failed at startup.using, andPingerService/PublisherServiceinjected the scopedIMessageBusinto a singleton hosted service, which fails scope validation in Development (so it always failed under Aspire).net9.0, so the pinned-f net9.0Compile builds them with no NETSDK1005 risk, and noBuild Project="false"entry is needed.WaitForCompletion(checked againstJasperFxAspireStartupExtensions.ApplyGatesin JasperFx 2.93.1). Only the dashboard buttons spawn adotnet run --no-buildchild process. Also added a short "Traces, Metrics and Health Checks" section that embeds the service defaults via mdsnippets.Verified locally
MSBUILDDISABLENODEREUSE=1 dotnet build wolverine.slnx -c Release -f net9.0: 0 errors. The 3 warnings are the existing MessagePack NU1902 advisories, and the build log shows all 8 Aspire projects built.dotnet run. Aspire started the RabbitMQ/Kafka containers and both services,/healthand/alivereturnedHealthy 200through the DCP proxies, and messages flowed (about 50 ping/pong and about 65 order publish/handle log lines in a minute).Not done: a CI target for the samples (CI is off today), left as a follow-up.
Closes #5124
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U