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
- Creating a
TrackingLog
. - Creating a
TrackingEvent
. - Creating a
TrackingError
.
- This solution aims to make the wire up of these 3 events as easy as possible.
TrackingLog
Create -
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
-> theTrackingLog
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:
TrackingEvent
Create TrackingError
Create Potential Issues
- A
TrackingLog
needs to be created for a Tracking object beforeTrackingEvent(s)
and/orTrackingError(s)
can be appended to theTrackingLog
. - Depending on processing,
TrackingEvent(s)
and/orTrackingError(s)
could be lost in to the void. - This would happen if a
TrackingEvent
orTrackingError
is posted before the actualTrackingLog
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.