eShop icon indicating copy to clipboard operation
eShop copied to clipboard

Add Commented Out Code for Azure Native Monitoring

Open mattmccleary opened this issue 1 year ago • 8 comments

mattmccleary avatar Jul 19 '24 21:07 mattmccleary

@dotnet-policy-service agree company="Microsoft"

mattmccleary avatar Aug 01 '24 04:08 mattmccleary

@samsp-msft Thoughts on my latest push? I added conditionals to each service reference.

mattmccleary avatar Aug 01 '24 06:08 mattmccleary

@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?

samsp-msft avatar Aug 01 '24 17:08 samsp-msft

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.

samsp-msft avatar Aug 06 '24 16:08 samsp-msft

Issue: https://github.com/dotnet/aspire/issues/5192

mitchdenny avatar Aug 07 '24 04:08 mitchdenny

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

BrennanConroy avatar Sep 26 '24 20:09 BrennanConroy

Great to see this on eShopOnAzure!!

I tested it and got it to run...but ran into a few issues along the way.

  1. Needed to update Aspire.Hosting.AppHost and Grpc.Tools packages to eliminate errors.
  2. Needed to update Azure.Monitor.OpenTelemetry.AspNetCore for Live Metrics, a key feature
  3. 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?

mattmccleary avatar Sep 26 '24 21:09 mattmccleary