Common Logs Explained

The following are the examples of .Net logs you'll find for some common scenarios

1. Validation Logs

Most of the validation problems are because of the mismatch between market-associated specifiers and which specifiers are expected based on the market description. This is just a log entry; the message is processed and dispatched to the user code normally.

Example

2023-06-07 14:54:46,260  INFO	 [19]	 FeedMessageValidator	 Specifiers check failed. Producer=5, market[id=877], Required:inningnr,total,maxovers, Actual:matchinningnr,maxovers,total,inningnr
2023-06-07 14:54:46,264	 WARN	 [19]	 OddsFeedSession	 Live: Problems were detected while validating message=[odds_change ProducerId=5, EventId=sr:match:40481547, GeneratedAt=1686141350193, ReceivedAt=1686142486152, Age=1135959], but the message is still eligible for further processing.

2. FeedExt Raw Data Processing Logs

When subscribing to raw data (feed and API) utilizing FeedExt instead of a normal Feed instance, SDK logs how long it took in user code to process the raw message. Long times could indicate problems in user code and will slow down message processing in the SDK pipeline.

Example

2023-05-16 13:08:59,474	 INFO	 [com:5671)]	 FeedExt	 Dispatching raw feed message [prematch]: odds_change for event sr:match:39497539 (173202793) took 1 ms.

3. RabbitMQ Message Logs

Each feed message is logged when picked up by the SDK from the underlying rabbit mq library. GeneratedAt is the timestamp when the message was created on the server side, ReceivedAt when it was picked up by the SDK (when it entered SDK processing pipeline) and Age the difference in ms. Depends on the message type it may or may not have associated EventId.

Example

2023-05-16 13:08:32,571	 INFO	 [com:5671)]	 RabbitMqMessageReceiver	 Message received. Message=[alive ProducerId=5, GeneratedAt=1684235311215, ReceivedAt=1684235312545, Age=1330]. 
2023-05-16 13:08:32,571	 INFO	 [com:5671)]	 RabbitMqMessageReceiver	 Message received. Message=[odds_change ProducerId=3, EventId=sr:match:41286131, GeneratedAt=1684235310565, ReceivedAt=1684235312544, Age=1979].    

4. Producer Recovery Logs

Handling recovery process and monitoring producer state is complex mechanism within SDK. It produces log messages for every change between states, with relevant data. Some of the checks are done on every message, and some on timer (in case no message arrive).

On timer (every 10s) it also checks the state of the producer. That is the state as sdk sees it, and does not reflect the state of the server producer.

Example

5. Internal state of producer

When criteria is met which would cause the change of sdk internal state of producer, logs can provide insight what is the reason for change.

Example

6. Timer-Based Checks:

On timer the state of each available producer is checked. Tracking is also done for each configured session.

  • The "age" specifies the time elapsed from message generation (by the feed) and the current time (i.e. current_time - message_generation_time).

  • The "latency" specifies the time elapsed message generation (by the feed) and when it was received by the SDK(i.e. message_receival_time - message_generation_time).

Log entry explanation: The entry can be break-down into two parts:

  • Producer info: 1(LO):[IsUp=False,Timestamp=01.01.0001-00:00:00.000(Started)

    • 1(LO) - the id and name of the producer

    • IsUp=False - whether the producer is marked as "up" or "down" at a moment the entry was written

    • Timestamp=01.01.0001-00:00:00.000 - The "Timestamp before disconnect" - indicating the time from which the recovery has to be made if the SDK is restarted. Value 01.01.0001-00:00:00.000 is a min date/time that can be represented in .net framework and indicates that a full recovery needs to be done.

    • (Started) - internal state of the producer. The following values are defined:

      • NotStarted - the recovery has not been started yet

      • Started - the recovery has been started and is still in progress

      • Completed - the recovery has been completed and the status of the producer is up-to-date

      • Error - the recovery has failed and will be re-started when the next alive is received from the feed

      • FatalError - the recovery has failed with un-recoverable error and will not be attempted again. This only happens when the recovery timestamp is set to much in the past and therefore cannot be initiated.

      • Delayed - the recovery has been completed and the status of the producer is up-to-date, but the user is falling behind with message processing (processing is to slow).

  • timing info: [[Ping(Ok):age=00:00:01,918],[IsBehind(True):Alive(s)[all:age=00:08:17,088],NonAlives[all:latency=00:05:20,859]]].

    • Ping(Ok) - whether the producer is behaving as expected (based on the age of the last alive message being smaller than maxInactivitySeconds config property

    • age=00:00:01,918 - the age of the last alive message received on a session which is not affected by other messages

    • IsBehind(True) - specifies whether the user is falling behind on message processing. The producer is considered as "behind" when either latency or age of any message is larger than maxInactivitySeconds

    • Alive(s)[all:age=00:08:17,088] - the age of last alive message received on user created sessions. If the user created more than one session, the output will specify multiple ages

    • NonAlives[all:latency=00:05:20,859] - the latency of last non-alive (bet_stop, odds_change) message received on user created sessions. If the user created more than one session, the output will specify multiple latencies

    Example

7. Recovery Request Logs

Closely related is also RecoveryRequestIssuer. When new API call for recovery request needs to be made, it logs which kind of recovery is done.

Example

8. API Call Logs (DataRouterManager)

DataRouterManager handles majority of API calls. The log message shows which endpoint was called, parameters and how long it took. Taken time is for the full method execution and not just pure HttpClient request (for that associated log entry can be checked in RestTraffic log). Saving indicates how long the sdk needed to distribute received data between internal caches. This is logged only if it takes longer then 20ms.

Example

9. RestTraffic Logs

All the API calls are logged in RestTraffic. Based on the log level set by the user, the logs can be different. On info level just traceId, url and duration is logged. On debug level also the actual xml received from the API is logged. Debug level is recommended during integration period. When exception happens all the data is logged. INFO log example

DEBUG log example

10. SportEventStatus Logs

Receiving SportEventStatus from timeline endpoint can be cached or ignored based on user configuration property IgnoreBetPalTimelineSportEventStatus (default false). As name implies only SportEventStatus received in response from timeline endpoint for events associated with BetPal producer will be ignored.

Example

Last updated

Was this helpful?