Tuesday, August 26, 2025

#1081 OCI Log Analytics - Leveraging LoganAI for OIC insights

I've been a great advocate of OCI Log Analytics for a very long time. As you all probably know, it is very easy to push your OIC activity stream logs to OCI Log Analytics. And there the magic begins!

LoganAI is a new capability that allows you to interpret your log data via a chat interface, i.e. no more need for constructing complex MQL queries - just ask and you shall receive!

For those new to OCI Log analytics, I suggest you check out the plethora of posts available here.

For those that want a deep dive into LoganAI first, then check out the excellent post from Kumar here.

All read up? Then let's start with the following project in OIC and the 4 order processing integrations we'll look at -

The integrations themselves are banal - the only one with any logic is validateOrder. 
All 4 integrations have the following tracking fields - orderNr, product, customer. 


I trigger a couple of instances of each integration - 

Now to OCI Log Analytics - 

I query on the OIC activity stream log group - 

'Log Source' = 'OCI Integration Activity Stream Logs' and 'Log Group' = My_OIC_LogGroup | fields -Entity, -'Entity Type', -'Host Name (Server)', -'Problem Priority', -Label, -'Log Source', -'Log Group' | fields 'Integration ID', OICStatus, Message | timestats count as logrecords by Integration | sort -logrecords


Notice the highlighted icon - 

It knows the type of log file were looking at, It tells me that the integrations are related to order processing and it suggests a couple of follow-up questions.

But I have my own questions - 

  • did any integrations fail?
1 integration failed, validateOrder,  and I now have the identifier of that flow and also the reason for the failure - "Invalid Country".

  • what is the orderNr of the failed instance? 
So orderNr 4 failed 

  • How many orders did I process in the last 3 hours?

11 orders? now let me ask a more precise question - 

  • How many orders were created in the last 3 hours?
According to OIC Observability -

What does Log Explorer show?

  • what are the order numbers of the orders created in the last 3 hours?

  • are there any duplicate order numbers for create order?
Looks like we have a duplicate - order nr 3.

  • Did any orders fail validation? 
  • Which order took the longest to fulfill? Please also return the orderNr.
  • give me the orderNr of the order that was fulfilled fastest
  • give me the order numbers of the orders that have passed validation, but have not yet been shipped
Yes, orderNr 2 has been validated, but not yet shipped.

Now I will look at the average execution time of the createOrder flows - 

I check one of the instances in OIC -

There are 2 ways to look at average here, depending on what you take as the starting point. For this case, I will use Wire Message received as the start event. Because this includes the internal wait time. The flow, shown in the screenshot, took 250 msecs.

  • what's the average execution time of the createOrder integration? Use the Message Received action as the start event.
I'm sure you've got the idea at this stage.

Finally, I save the query in Log Explorer

I can now drill into this - 

and click the above icon to start the AI chat.

Summa Summarum

This is a great addition to the wider OIC Observability toolkit. Do check it out and see how easy it really is to drill into your activity stream logs.

Kudos to my OCI Log analytics colleagues Zubair & Kumar - well done guys!



 













 

No comments: