Add Commented Out Code for Azure Native Monitoring
@dotnet-policy-service agree company="Microsoft"
@samsp-msft Thoughts on my latest push? I added conditionals to each service reference.
@samsp-msft Thoughts on my latest push? I added conditionals to each service reference.
If necessary, we can do that, but I really would prefer an ability to do a conditional cleanly in the apphost as its going to be a pretty common scenario.
@mitchdenny - How can we make conditionals clean in the apphost file?
We met and discussed the options - nothing is available right now that makes this cleaner. we should go in with the commented out blocks, and @mitchdenny will file an issue for adding a conditional in the builder pattern.
Issue: https://github.com/dotnet/aspire/issues/5192
Azure specific components are included in eShopOnAzure.
AppInsights (Azure Monitoring) is already included in eShopOnAzure: https://github.com/Azure-Samples/eShopOnAzure/blob/9da1eccec3454b19cd11a9b44001cd0323deb749/src/eShop.AppHost/Program.cs#L10
Great to see this on eShopOnAzure!!
I tested it and got it to run...but ran into a few issues along the way.
- Needed to update Aspire.Hosting.AppHost and Grpc.Tools packages to eliminate errors.
- Needed to update Azure.Monitor.OpenTelemetry.AspNetCore for Live Metrics, a key feature
- Several Projects basket-api, catalog-api, order-processor, ordering-api, payment-processor, and webapp, webhooks-api ran for a short amount of time then shows State "Finished" on the Aspire Viewer. All other Projects, Containers, and Databases showed as "Running".
Also, I needed to add a Connection String to appsettings.json. Should we document that somewhere?