Thursday, October 7, 2021

#884 Using OCI Logging for searching OIC Activity Stream Log




Scenario is as follows - I have an order processing integration used by many of my trading customers. Often they contact me to query what was actually ordered. I can use OIC Monitoring-> Tracking to fid the order, but what happens if the customer contacts me 3 weeks later? Maybe the data is no longer in the Activity Stream log. Here's where OCI Logging comes into play - Enabling OIC to send its activity stream log to OCI Logging is easy - 












Now to this simple demo order processing integration - 

























The Hare of the Dog pub has ordered a keg of Guinness - whatever that is. But as we say at Commiskey Beer Wholesalers - the customer is always right. The JSON payload is transformed into XML for processing - 
I check out what the order looks like in the Activity Stream - 




















Now to finding order 2112 in OCI Logging - 


 



As you see, I can specify compartment, Log Group and Log - I am only interested in the OIC Activity Stream, so I select that as the filter -

Here I see all the log entries, but I am only interested in OrderNr 2112. 

Here is the default query based on compartment/log group/log - 







Now I can augment this with a full text search for a string. I am looking for <orderNr>2112. - note the use of the 2 wildcards *- 



I see the content when I hover over the line with my mouse, unfortunately, it doesn't like screenshots.  
Again, hovering over "message" will show the order details. But, for the sake of this post, I will copy the contents of the message to notepad++









and there is the order - 


No comments:

Post a Comment