-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding using RabbitMq worker, simple chaos, telemetry propagation #671
base: main
Are you sure you want to change the base?
Conversation
dankoverride
commented
Jan 29, 2025
- Upstream support OTel support
- Introduced random chaos
- Adding rabbit.
- Worker and ActivitySource wireup with Rabbit
* Upstream support OTel support * Introduced random chaos * Adding rabbit. * Worker and ActivitySource wireup with Rabbit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 26 changed files in this pull request and generated 2 comments.
Files not reviewed (15)
- samples/AspireShop/AspireShop.AppHost/AspireShop.AppHost.csproj: Language not supported
- samples/AspireShop/AspireShop.BasketBus/AspireShop.BasketBus.csproj: Language not supported
- samples/AspireShop/AspireShop.BasketService/AspireShop.BasketService.csproj: Language not supported
- samples/AspireShop/AspireShop.BasketService/appsettings.Development.json: Language not supported
- samples/AspireShop/AspireShop.BasketWorker/AspireShop.BasketWorker.csproj: Language not supported
- samples/AspireShop/AspireShop.BasketWorker/Properties/launchSettings.json: Language not supported
- samples/AspireShop/AspireShop.BasketWorker/appsettings.Development.json: Language not supported
- samples/AspireShop/AspireShop.BasketWorker/appsettings.json: Language not supported
- samples/AspireShop/AspireShop.Chaos/AspireShop.Chaos.csproj: Language not supported
- samples/AspireShop/AspireShop.Frontend/AspireShop.Frontend.csproj: Language not supported
- samples/AspireShop/AspireShop.AppHost/Program.cs: Evaluated as low risk
- samples/AspireShop/AspireShop.BasketBus/BasicBus.cs: Evaluated as low risk
- samples/AspireShop/AspireShop.BasketBus/BasicConsumer.cs: Evaluated as low risk
- samples/AspireShop/AspireShop.BasketService/BasketService.cs: Evaluated as low risk
- samples/AspireShop/AspireShop.BasketService/Program.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
samples/AspireShop/AspireShop.Chaos/ChaosProvider.cs:18
- [nitpick] The method name 'PonderChaosAsync' is ambiguous. Consider renaming it to something more descriptive like 'IntroduceRandomChaosAsync'.
public Task PonderChaosAsync()
if (new Random(Guid.NewGuid().GetHashCode()).Next(0, 100) == 0) | ||
{ | ||
throw new Exception("Random Chaos"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception message 'Random Chaos' is not very descriptive. Consider providing more context in the message.
if (new Random(Guid.NewGuid().GetHashCode()).Next(0, 100) == 0) | |
{ | |
throw new Exception("Random Chaos"); | |
int randomValue = new Random(Guid.NewGuid().GetHashCode()).Next(0, 100); | |
if (randomValue == 0) | |
{ | |
throw new Exception($"Random Chaos occurred with random value: {randomValue}"); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
await _chaosProvider.PonderChaosAsync(); | ||
|
||
// Simulate some work | ||
Thread.Sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Thread.Sleep in an async method can block the thread. Replace it with await Task.Delay(1000);
Thread.Sleep(1000); | |
await Task.Delay(1000); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.