Fix non-structured traces
This commit is contained in:
parent
0ace494964
commit
e8262539de
@ -41,10 +41,4 @@
|
|||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />
|
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj" />
|
|
||||||
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBus\EventBus.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -2,14 +2,13 @@
|
|||||||
using Basket.API.Model;
|
using Basket.API.Model;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Services;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Services;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Serilog.Context;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using DotNetCore.CAP;
|
||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
|
namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
|
||||||
{
|
{
|
||||||
@ -20,14 +19,14 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
|
|||||||
{
|
{
|
||||||
private readonly IBasketRepository _repository;
|
private readonly IBasketRepository _repository;
|
||||||
private readonly IIdentityService _identityService;
|
private readonly IIdentityService _identityService;
|
||||||
private readonly IEventBus _eventBus;
|
private readonly ICapPublisher _eventBus;
|
||||||
private readonly ILogger<BasketController> _logger;
|
private readonly ILogger<BasketController> _logger;
|
||||||
|
|
||||||
public BasketController(
|
public BasketController(
|
||||||
ILogger<BasketController> logger,
|
ILogger<BasketController> logger,
|
||||||
IBasketRepository repository,
|
IBasketRepository repository,
|
||||||
IIdentityService identityService,
|
IIdentityService identityService,
|
||||||
IEventBus eventBus)
|
ICapPublisher eventBus)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
@ -78,18 +77,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
|
|||||||
// Once basket is checkout, sends an integration event to
|
// Once basket is checkout, sends an integration event to
|
||||||
// ordering.api to convert basket to order and proceeds with
|
// ordering.api to convert basket to order and proceeds with
|
||||||
// order creation process
|
// order creation process
|
||||||
try
|
_eventBus.Publish(nameof(UserCheckoutAcceptedIntegrationEvent), eventMessage);
|
||||||
{
|
|
||||||
_logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {AppName} - ({@IntegrationEvent})", eventMessage.Id, Program.AppName, eventMessage);
|
|
||||||
|
|
||||||
_eventBus.Publish(eventMessage);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "ERROR Publishing integration event: {IntegrationEventId} from {AppName}", eventMessage.Id, Program.AppName);
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Accepted();
|
return Accepted();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Basket.API.IntegrationEvents.Events;
|
using Basket.API.IntegrationEvents.Events;
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API;
|
using Microsoft.eShopOnContainers.Services.Basket.API;
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -10,7 +9,7 @@ using DotNetCore.CAP;
|
|||||||
|
|
||||||
namespace Basket.API.IntegrationEvents.EventHandling
|
namespace Basket.API.IntegrationEvents.EventHandling
|
||||||
{
|
{
|
||||||
public class OrderStartedIntegrationEventHandler : IIntegrationEventHandler<OrderStartedIntegrationEvent>, ICapSubscribe
|
public class OrderStartedIntegrationEventHandler : ICapSubscribe
|
||||||
{
|
{
|
||||||
private readonly IBasketRepository _repository;
|
private readonly IBasketRepository _repository;
|
||||||
private readonly ILogger<OrderStartedIntegrationEventHandler> _logger;
|
private readonly ILogger<OrderStartedIntegrationEventHandler> _logger;
|
||||||
@ -26,9 +25,9 @@ namespace Basket.API.IntegrationEvents.EventHandling
|
|||||||
//TODO: [CapSubscribe(nameof(OrderStartedIntegrationEvent))]
|
//TODO: [CapSubscribe(nameof(OrderStartedIntegrationEvent))]
|
||||||
public async Task Handle(OrderStartedIntegrationEvent @event)
|
public async Task Handle(OrderStartedIntegrationEvent @event)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
|
using (LogContext.PushProperty("IntegrationEventContext", $"{Program.AppName}"))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
|
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", Program.AppName, @event);
|
||||||
|
|
||||||
await _repository.DeleteBasketAsync(@event.UserId.ToString());
|
await _repository.DeleteBasketAsync(@event.UserId.ToString());
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events;
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events;
|
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Serilog.Context;
|
using Serilog.Context;
|
||||||
@ -10,7 +9,7 @@ using DotNetCore.CAP;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling
|
namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling
|
||||||
{
|
{
|
||||||
public class ProductPriceChangedIntegrationEventHandler : IIntegrationEventHandler<ProductPriceChangedIntegrationEvent>, ICapSubscribe
|
public class ProductPriceChangedIntegrationEventHandler : ICapSubscribe
|
||||||
{
|
{
|
||||||
private readonly ILogger<ProductPriceChangedIntegrationEventHandler> _logger;
|
private readonly ILogger<ProductPriceChangedIntegrationEventHandler> _logger;
|
||||||
private readonly IBasketRepository _repository;
|
private readonly IBasketRepository _repository;
|
||||||
@ -26,9 +25,9 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even
|
|||||||
//TODO: [CapSubscribe(nameof(ProductPriceChangedIntegrationEvent))]
|
//TODO: [CapSubscribe(nameof(ProductPriceChangedIntegrationEvent))]
|
||||||
public async Task Handle(ProductPriceChangedIntegrationEvent @event)
|
public async Task Handle(ProductPriceChangedIntegrationEvent @event)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
|
using (LogContext.PushProperty("IntegrationEventContext", $"{Program.AppName}"))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
|
_logger.LogInformation("----- Handling integration event: {AppName} - ({@IntegrationEvent})", Program.AppName, @event);
|
||||||
|
|
||||||
var userIds = _repository.GetUsers();
|
var userIds = _repository.GetUsers();
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
namespace Basket.API.IntegrationEvents.Events
|
||||||
|
|
||||||
namespace Basket.API.IntegrationEvents.Events
|
|
||||||
{
|
{
|
||||||
// Integration Events notes:
|
// Integration Events notes:
|
||||||
// An Event is “something that has happened in the past”, therefore its name has to be
|
// An Event is “something that has happened in the past”, therefore its name has to be
|
||||||
// An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems.
|
// An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems.
|
||||||
public class OrderStartedIntegrationEvent : IntegrationEvent
|
public class OrderStartedIntegrationEvent
|
||||||
{
|
{
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events
|
||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events
|
|
||||||
{
|
{
|
||||||
// Integration Events notes:
|
// Integration Events notes:
|
||||||
// An Event is “something that has happened in the past”, therefore its name has to be
|
// An Event is “something that has happened in the past”, therefore its name has to be
|
||||||
// An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems.
|
// An Integration Event is an event that can cause side effects to other microsrvices, Bounded-Contexts or external systems.
|
||||||
public class ProductPriceChangedIntegrationEvent : IntegrationEvent
|
public class ProductPriceChangedIntegrationEvent
|
||||||
{
|
{
|
||||||
public int ProductId { get; private set; }
|
public int ProductId { get; private set; }
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Basket.API.IntegrationEvents.Events
|
namespace Basket.API.IntegrationEvents.Events
|
||||||
{
|
{
|
||||||
public class UserCheckoutAcceptedIntegrationEvent : IntegrationEvent
|
public class UserCheckoutAcceptedIntegrationEvent
|
||||||
{
|
{
|
||||||
public string UserId { get; }
|
public string UserId { get; }
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
using Basket.API.Model;
|
using Basket.API.Model;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Controllers;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Controllers;
|
||||||
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
using Microsoft.eShopOnContainers.Services.Basket.API.Model;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -11,6 +10,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using DotNetCore.CAP;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using IBasketIdentityService = Microsoft.eShopOnContainers.Services.Basket.API.Services.IIdentityService;
|
using IBasketIdentityService = Microsoft.eShopOnContainers.Services.Basket.API.Services.IIdentityService;
|
||||||
|
|
||||||
@ -20,14 +20,14 @@ namespace UnitTest.Basket.Application
|
|||||||
{
|
{
|
||||||
private readonly Mock<IBasketRepository> _basketRepositoryMock;
|
private readonly Mock<IBasketRepository> _basketRepositoryMock;
|
||||||
private readonly Mock<IBasketIdentityService> _identityServiceMock;
|
private readonly Mock<IBasketIdentityService> _identityServiceMock;
|
||||||
private readonly Mock<IEventBus> _serviceBusMock;
|
private readonly Mock<ICapPublisher> _serviceBusMock;
|
||||||
private readonly Mock<ILogger<BasketController>> _loggerMock;
|
private readonly Mock<ILogger<BasketController>> _loggerMock;
|
||||||
|
|
||||||
public BasketWebApiTest()
|
public BasketWebApiTest()
|
||||||
{
|
{
|
||||||
_basketRepositoryMock = new Mock<IBasketRepository>();
|
_basketRepositoryMock = new Mock<IBasketRepository>();
|
||||||
_identityServiceMock = new Mock<IBasketIdentityService>();
|
_identityServiceMock = new Mock<IBasketIdentityService>();
|
||||||
_serviceBusMock = new Mock<IEventBus>();
|
_serviceBusMock = new Mock<ICapPublisher>();
|
||||||
_loggerMock = new Mock<ILogger<BasketController>>();
|
_loggerMock = new Mock<ILogger<BasketController>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ namespace UnitTest.Basket.Application
|
|||||||
.Returns(Task.FromResult(fakeCustomerBasket));
|
.Returns(Task.FromResult(fakeCustomerBasket));
|
||||||
_identityServiceMock.Setup(x => x.GetUserIdentity()).Returns(fakeCustomerId);
|
_identityServiceMock.Setup(x => x.GetUserIdentity()).Returns(fakeCustomerId);
|
||||||
|
|
||||||
_serviceBusMock.Setup(x => x.Publish(It.IsAny<UserCheckoutAcceptedIntegrationEvent>()));
|
_serviceBusMock.Setup(x => x.Publish(nameof(UserCheckoutAcceptedIntegrationEvent), It.IsAny<UserCheckoutAcceptedIntegrationEvent>(), null));
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
var basketController = new BasketController(
|
var basketController = new BasketController(
|
||||||
@ -54,7 +54,6 @@ namespace UnitTest.Basket.Application
|
|||||||
var actionResult = await basketController.GetBasketByIdAsync(fakeCustomerId);
|
var actionResult = await basketController.GetBasketByIdAsync(fakeCustomerId);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
|
|
||||||
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
|
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +67,7 @@ namespace UnitTest.Basket.Application
|
|||||||
_basketRepositoryMock.Setup(x => x.UpdateBasketAsync(It.IsAny<CustomerBasket>()))
|
_basketRepositoryMock.Setup(x => x.UpdateBasketAsync(It.IsAny<CustomerBasket>()))
|
||||||
.Returns(Task.FromResult(fakeCustomerBasket));
|
.Returns(Task.FromResult(fakeCustomerBasket));
|
||||||
_identityServiceMock.Setup(x => x.GetUserIdentity()).Returns(fakeCustomerId);
|
_identityServiceMock.Setup(x => x.GetUserIdentity()).Returns(fakeCustomerId);
|
||||||
_serviceBusMock.Setup(x => x.Publish(It.IsAny<UserCheckoutAcceptedIntegrationEvent>()));
|
_serviceBusMock.Setup(x => x.Publish(nameof(UserCheckoutAcceptedIntegrationEvent), It.IsAny<UserCheckoutAcceptedIntegrationEvent>(), null));
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
var basketController = new BasketController(
|
var basketController = new BasketController(
|
||||||
@ -80,7 +79,6 @@ namespace UnitTest.Basket.Application
|
|||||||
var actionResult = await basketController.UpdateBasketAsync(fakeCustomerBasket);
|
var actionResult = await basketController.UpdateBasketAsync(fakeCustomerBasket);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
|
|
||||||
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
|
Assert.Equal(((CustomerBasket)actionResult.Value).BuyerId, fakeCustomerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +130,7 @@ namespace UnitTest.Basket.Application
|
|||||||
//Act
|
//Act
|
||||||
var result = await basketController.CheckoutAsync(new BasketCheckout(), Guid.NewGuid().ToString()) as AcceptedResult;
|
var result = await basketController.CheckoutAsync(new BasketCheckout(), Guid.NewGuid().ToString()) as AcceptedResult;
|
||||||
|
|
||||||
_serviceBusMock.Verify(mock => mock.Publish(It.IsAny<UserCheckoutAcceptedIntegrationEvent>()), Times.Once);
|
_serviceBusMock.Verify(mock => mock.Publish(nameof(UserCheckoutAcceptedIntegrationEvent), It.IsAny<UserCheckoutAcceptedIntegrationEvent>(), null), Times.Once);
|
||||||
|
|
||||||
Assert.NotNull(result);
|
Assert.NotNull(result);
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
using Autofac;
|
using Autofac;
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
|
||||||
using Ordering.SignalrHub.IntegrationEvents;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ordering.SignalrHub.AutofacModules
|
namespace Ordering.SignalrHub.AutofacModules
|
||||||
{
|
{
|
||||||
@ -22,8 +15,8 @@ namespace Ordering.SignalrHub.AutofacModules
|
|||||||
protected override void Load(ContainerBuilder builder)
|
protected override void Load(ContainerBuilder builder)
|
||||||
{
|
{
|
||||||
|
|
||||||
builder.RegisterAssemblyTypes(typeof(OrderStatusChangedToAwaitingValidationIntegrationEvent).GetTypeInfo().Assembly)
|
// builder.RegisterAssemblyTypes(typeof(OrderStatusChangedToAwaitingValidationIntegrationEvent).GetTypeInfo().Assembly)
|
||||||
.AsClosedTypesOf(typeof(IIntegrationEventHandler<>));
|
// .AsClosedTypesOf(typeof(IIntegrationEventHandler<>));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@ namespace Ordering.SignalrHub.IntegrationEvents.EventHandling
|
|||||||
//TODO: [CapSubscribe(nameof(OrderStatusChangedToCancelledIntegrationEvent))]
|
//TODO: [CapSubscribe(nameof(OrderStatusChangedToCancelledIntegrationEvent))]
|
||||||
public async Task Handle(OrderStatusChangedToCancelledIntegrationEvent @event)
|
public async Task Handle(OrderStatusChangedToCancelledIntegrationEvent @event)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
|
using (LogContext.PushProperty("IntegrationEventContext", $"{Program.AppName}"))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
|
_logger.LogInformation("----- Handling integration event: {AppName} - ({@IntegrationEvent})", Program.AppName, @event);
|
||||||
|
|
||||||
await _hubContext.Clients
|
await _hubContext.Clients
|
||||||
.Group(@event.BuyerName)
|
.Group(@event.BuyerName)
|
||||||
|
@ -24,9 +24,9 @@ namespace Ordering.SignalrHub.IntegrationEvents.EventHandling
|
|||||||
//TODO [CapSubscribe(nameof(OrderStatusChangedToPaidIntegrationEvent))]
|
//TODO [CapSubscribe(nameof(OrderStatusChangedToPaidIntegrationEvent))]
|
||||||
public async Task Handle(OrderStatusChangedToPaidIntegrationEvent @event)
|
public async Task Handle(OrderStatusChangedToPaidIntegrationEvent @event)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
|
using (LogContext.PushProperty("IntegrationEventContext", $"{Program.AppName}"))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
|
_logger.LogInformation("----- Handling integration event: {AppName} - ({@IntegrationEvent})", Program.AppName, @event);
|
||||||
|
|
||||||
await _hubContext.Clients
|
await _hubContext.Clients
|
||||||
.Group(@event.BuyerName)
|
.Group(@event.BuyerName)
|
||||||
|
@ -24,9 +24,9 @@ namespace Ordering.SignalrHub.IntegrationEvents.EventHandling
|
|||||||
//TODO [CapSubscribe(nameof(OrderStatusChangedToShippedIntegrationEvent))]
|
//TODO [CapSubscribe(nameof(OrderStatusChangedToShippedIntegrationEvent))]
|
||||||
public async Task Handle(OrderStatusChangedToShippedIntegrationEvent @event)
|
public async Task Handle(OrderStatusChangedToShippedIntegrationEvent @event)
|
||||||
{
|
{
|
||||||
using (LogContext.PushProperty("IntegrationEventContext", $"{@event.Id}-{Program.AppName}"))
|
using (LogContext.PushProperty("IntegrationEventContext", $"{Program.AppName}"))
|
||||||
{
|
{
|
||||||
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, Program.AppName, @event);
|
_logger.LogInformation("----- Handling integration event: {AppName} - ({@IntegrationEvent})", Program.AppName, @event);
|
||||||
|
|
||||||
await _hubContext.Clients
|
await _hubContext.Clients
|
||||||
.Group(@event.BuyerName)
|
.Group(@event.BuyerName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user