Wire up notes - Zeppelin87/CSS-Sandbox GitHub Wiki

Separation of Concerns:

  • There are 3 primary separation of concerns when monitoring tracking via the NavCar.EventLog.Api
  1. Creating a TrackingLog.
  2. Creating a TrackingEvent.
  3. Creating a TrackingError.
  • This solution aims to make the wire up of these 3 events as easy as possible.

Create TrackingLog

  • A TrackingLog will be created for each Tracking object that is created on a load.

  • In other words, a TrackingLog will be posted to the esb ONCE... whenever a Tracking object is created.

  • Note: on POST TrackingLog -> the TrackingLog will be written to elastic w/ a .CreateTracking event on it.

  • Example: call to ESB:

var trackingLog = new TrackingLog()
{
   TrackingId = 12345,
   TrackingKey = "0_0",
   UserId = 6789,
   CarrierCode = "T12345",
   Message = "Active Tracking Created",
   SourceApp = "NavisphereCarrier.Tracking.Api",
   MethodName = "Create",
   OccurredOn = DateTime.UtcNow
};
  • Ex Elasticsearch result:

Create TrackingEvent


Create TrackingError


Potential Issues

  • A TrackingLog needs to be created for a Tracking object before TrackingEvent(s) and/or TrackingError(s) can be appended to the TrackingLog.
  • Depending on processing, TrackingEvent(s) and/or TrackingError(s) could be lost in to the void.
  • This would happen if a TrackingEvent or TrackingError is posted before the actual TrackingLog was created.
  • This may or may not be an issue & we can take a look at the NavCar.EventLog.Api errors to see if this does become an issue.