Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dankoverride
Copy link

  • 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
@dankoverride
Copy link
Author

image

@danmoseley danmoseley requested a review from Copilot January 31, 2025 22:41
Copy link

@Copilot Copilot AI left a 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()

Comment on lines +28 to +30
if (new Random(Guid.NewGuid().GetHashCode()).Next(0, 100) == 0)
{
throw new Exception("Random Chaos");
Copy link
Preview

Copilot AI Jan 31, 2025

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.

Suggested change
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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
await _chaosProvider.PonderChaosAsync();

// Simulate some work
Thread.Sleep(1000);
Copy link
Preview

Copilot AI Jan 31, 2025

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);

Suggested change
Thread.Sleep(1000);
await Task.Delay(1000);

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant