Integrating dockerized services with .NET Aspire – an example with Prometheus
Most Aspire examples focus on using services with native Aspire integrations, and the community has provided many popular .NET libraries as Aspire-compatible NuGet packages. In this recipe, however, we’ll take a different approach by setting up Prometheus. Prometheus is a powerful monitoring tool that provides persistent telemetry data suitable for production, in contrast to Aspire’s temporary telemetry. We will set up Prometheus in a separate Docker container and integrate it into our Aspire project. Although Aspire is primarily designed to minimize reliance on Docker, adding containerized services allows us to extend Aspire’s capabilities, orchestrating a broader range of tools and services within the same environment.
Getting ready…
This recipe requires that you have Docker installed. We recommend Docker Desktop. Make sure the Docker Desktop service is running and...