Monday, November 23, 2026

#1192 - Agent powered Observability for OIC

Introduction 

I have blogged about this topic before, namely using tools to monitor and troubleshoot. These tools are backed by integrations that use the OIC apis to retrieve monitoring data. So how could we implement such for the following requirement?

Business Transaction Traceability feature - users should be able to enter a business identifier (e.g., Order Number, Person Number, Employee Number) or an error message, and AI should automatically search across all OIC instances to identify related integrations and their execution history. It should display the end-to-end integration flow, instance statuses, failures and dependencies, along with potential root cause analysis.

I'm not going to implement a productized version of this, however, I will cover the main requirements.
Here I will use a couple of OIC factory apis as well as another api, which returns project dependencies.

Search instances on business identifier

For this simple demo I have created a create order integration with a tracking field, orderNr. The use case is to find instances for a specific orderNr, e.g. where is orderNr 8?

Here I use the following factory api - 

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances?offset=0&limit=50&q={businessIDValue:'7',timewindow:'6h',includePurged:'no',projectCode:'yourProject'}&orderBy=lastupdateddate&fields=detail&integrationInstance=yourOIC

I've already tested this in postman - 

Note the projectCode parameter - this will filter on instances belonging to a specific project. I won't use this now, as I'm looking across all projects and the global space. 

l create an integration - retrieve integration instances - which uses the factory api to do the necessary. The second screenshot shows the parameters I added -



Note, I could have included project, if required.

I expose this integration as an Agentic AI Tool - 


Get Project(Integration) dependencies

I open the above page in Chrome, having beforehand activated developer tools -

I will see the api called on the Network tab; the format is - 

https://design.integration.myRegion.ocp.oraclecloud.com/ic/api/integration/v1/projects/myProjectCode/dependencies?integrationInstance=myOICInstance
 
I try this out in postman and check out the response; this will contain the project assets, sorted into the following categories -

  • agents
  • connections
  • integrations
  • patterns (AI Agent related)
  • tools
Let's look at the integrations section for create order - 

note the associations section - here we see that the integrations uses 2 connections - ORDERS_DB and REST_TRIGGER.

Here's the section for the integration process order -  

It tells us that the integration "uses" (invokes) create order.

I create an integration that uses this api to get the project dependencies; it also is exposed as an AI agent tool -

now to getting the error details...

Get error details by instance id

This integration, retrieve errors by instance id, will retrieve the error details, which can then be surfaced to the user, along with LLM input on such.

This integration is also exposed as an AI Agent tool.

Let's move on to configuring the agent.


Configuring the agent


The agent prompt is as follows - 
Note the input - retrieve integration instances from the last {{timewindow}} which have a business id field {{fieldName}} with a value {{value}}

Here's an example - 


Now to the agent guidelines - these explain what data is involved and what needs to be done.

you monitor OIC integration instances, querying based on tracking field input.

For example, you will get a request - Retrieve integration instances from the last 6 hours which have a business id field orderNr with businessIDValue 310138. The retrieve integration instances tool retrieves integrations based on businessIDValue and timewindow. From the request received, you will set the businessID parameter to businessIDValue and timewindow to timewindow

Then I describe the tool response - 

The response includes the following fields -

totalResults - how many integration flows were found that match the search criteria
status - the outcome of the integration flow - possible values are COMPLETED or FAILED
trackings - contain the business identifiers. Flows can have up to 3 business identifiers. The first is the primary tracking field. Trackings include name and value. 
projectName - integrations can belong to projects. This fields holds the value of the project name 
projectCode- the code identifying the project, use this when invoking the get project dependencies tool
mepType - this indicates the type of integration - values include SYNC and ASYNC
hasRecoverableFaults - indicates an errored integration that can be resubmitted. Only ASYNC integrations can be resubmitted
integration - contains the full name of the integration, includes name, version and project
instanceId - is the unique runtime identifer of the specific integration flow / instance
creationDate - when the request to execute the integration flow was received
processingEndDate - when the flow completed
instanceReportingLevel - trace level set for this integration. Possible values are Production,Audit or Debug 
replayable - indicates whether the integration is replayable or not. This is an option set by the developer at activation

You will need to ensure the trackings name = whatever business id name user has entered. e.g. find all integrations with the orderNr 310138 will require you to only match on - 
 "name": "orderNr",
                "value": "310138"


Use these to give intelligent feedback on the integrations that have this value.

Now to the errors - 

For each errored integration instance, use the retrieve errors by instance id tool to retrieve error data.

The fields returned by get Error Details tool include - 
errorActionName - name of the action that errored out
errorActionType - the type of the action where the error occurred
errorCode - the code, if any, generated by the error
errorDetails - the technical details of the error
errorItems - is an array that contains 1 or more sets of error informantion. The fields include detailErrorMessage, errorActionName,errorActionType,errorCode,errorLocation,errorMessage,
            faultId,milestone (the internal code for the action), recoverable,retryCount,state,status
instanceId - the id of the OIC instance flow

The following details need to be output to the user: 
The names of the integrations which have the tracking field name and value specified in the user request.
The projects to which these integrations belong
When the integrations executed (creationDate / processingEndDate)
The outcome, whether completed or failed.
For failures, output where the error occurred (the action), the technical error and a user friendly version of the error.
Suggest any fixes you deem appropriate to the user

Next, the dependency analysis - 

Also add a dependencies section to your user output. Use the get project dependencies tool to retrieve the dependencies for every errored integration. Set the project parameter to the projectCode for the errored integration. as the project param

Tell the user which connections the errored integrations uses, also list which other integrations can invoke this integration (e.g. integration A uses integration B). The get project dependencies tool returns a response that describes a dependency graph: assets are the nodes, and references between assets are the relationships. 
It shows declared dependencies, rather than runtime execution history. The key rule is:
An integration’s associations lists the assets that integration depends on. Read each relationship as integration → referenced asset.

Asset identification
Asset          Location             Identifier format in this response
-----                 --------                      ---------------------------------- 
Connection assets.connections[] projectCode|connectionCode
Integration assets.integrations[] projectCode|integrationCode|version
Pattern assets.patterns[]         patternCode|version, scoped by projectId
Tool assets.tools[]             Tool ID, scoped by projectId

Treat identifiers as exact strings. Preserve spelling, case, and integration versions. For example, OIC_FACTORY_API and OCI_FACTORY_API are different codes in this response.
Use name for display and the complete identifier for matching. Two versions of an integration are separate dependency targets.

For every integration, inspect associations[]:
Field                       Interpretation
-----                         ---------------
associationType: "uses"       The containing integration depends on the referenced asset.
resourceType: "connection"   Resolve ref against assets.connections[].id.
resourceType: "integration"   Resolve ref against assets.integrations[].id. This represents an integration invocation dependency.
ref                           Identifier of the dependency target.

Finally, a bit of philosophical input - 

Finally, finish the user output with a quote from Marcus Aurelius

Test preparation

I run the create order integration for orderNr 10 - 

I run it again, with the same orderNr - 

Running the agent

Retrieve integration instances is called - 
Retrieve errors by instance id is called - 
Get project dependencies is called - 

Check out the output - 

Here is the text - 

Thinking: I have retrieved integration instances with the tracking field "orderNr" with value "10" for the last 1 hour. There are 3 instances found, two of which are for the integration "create order" in the project "AA-Anomaly-Detection." One of these instances completed successfully, and one failed. The failed instance error details indicate a database constraint violation caused by attempting to insert a duplicate order number "10" into the orders table. I have also retrieved the project dependencies for "AA_ANOMALY_DETECTION" to provide connection and invocation dependencies for the errored integration.

So where does the 3rd instance come from? Check out OIC Observability - 

This is from the tool itself. I can amend the guidelines to ignore such.

The next section - 

Observing the results:



  • Integration "create order" in project "AA-Anomaly-Detection" has instances with the orderNr "10."

  • One instance failed at the action "insertOrder" due to a unique constraint violation error on the ORDERS table (ORA-00001).

  • The error suggests that the order number "10" already exists in the database.

  • The integration uses the connections Orders DB and REST Trigger.

  • This integration is also invoked by the "process order" integration in the same project, and it uses these connections as well.


Action: I will now summarize these findings and provide suggestions for fixes to the user.

The next section - 

Summary for user:



  • Found integrations tracking orderNr=10 in the last 1 hour:

    1. Integration: "create order" (version 01.00.0000) in project "AA-Anomaly-Detection"

      • Instance at 2026-11-23T07:49:11.251 completed successfully.

      • Instance at 2026-11-23T07:49:40.627 failed during "insertOrder" action.

        • Error: Unique constraint violation on ORDERS table. The order number "10" already exists.

        • This is a database insertion error likely due to attempted duplicate order insertion.
 
Next, the dependency section, although we already have been given the salient data - 

  • The "create order" integration uses connections: Orders DB and REST Trigger.

  • The integration is invoked by the "process order" integration in the same project.

  • Suggested fix: Check for duplicate order numbers before attempting insertion or handle the constraint violation gracefully by updating existing records or notifying the user accordingly.


Finally, some words of wisdom - 

Quote: "Waste no more time arguing about what a good man should be. Be one." - Marcus Aurelius


Summa Summarum

This was a quick POC, just to show the feasibility of using an agent to speed up error isolations and resolution. I hope have demonstrated the value add of this approach and look forward to your feedback. Just mail me at niall.commiskey@oracle.com.

Let's finish with a late autumnal beer - 

Cervisia Autumnalis Serotina 

Landwehr beer is brewed in the vicinity of Rothenburg, a well known tourist spot for those interested in all things medieval. Founded in 1755, this brewery product a great assortment of beers, ranging from helles to dunkles, including pils, kellerbier, jahrgangsbier. Net, net - there's a beer for everyone here. I was drinking their helles, very refreshing with that perfect hoppy/malty taste of a true Franconian beer. 

Sláinte!




 

Tuesday, November 17, 2026

#1191 - File Server Concurrent Connections Metric

Introduction

Many OIC customers use the OIC File Server for file processing scenarios, MFT etc. This sftp server, however, has a concurrency limit - 

So how do I know where I stand in relation to this limit of 50? For that there is an OCI Service Metric - File Server Inbound Connections. 

The default MQL you see in the OIC Monitoring page in OCI is - FileserverInboundConnections[1m]{resourceId = "yourOIC OCID"}.grouping().sum()

More about this later.

I'm going to run a couple of tests to see how this metric surfaces, but, before doing so, please note that metric sampling currently happens every 5 minutes. So this metric may not deliver an exact view of concurrency, but can certainly help you isolate trends etc.

File Server Concurrent Connections Test

I run the test in Windows PowerShell; it will open up 10 connections and keep them open for 12 minutes.

try {
    # Start 10 independent SFTP processes.
    1..10 | ForEach-Object {
        $info = New-Object System.Diagnostics.ProcessStartInfo
        $info.FileName = (Get-Command sftp.exe).Source
        $info.UseShellExecute = $false
        $info.RedirectStandardInput = $true
        $info.Arguments = (
            '-b - -i "{0}" -oBatchMode=yes ' +
            '-oControlMaster=no -oControlPath=none ' +
            '-oConnectTimeout=20 -P {1} "{2}@{3}"'
        ) -f $KeyPath, $OicPort, $OicUser, $OicHost

        $process = [System.Diagnostics.Process]::Start($info)
        $connections += $process
    }

    # Keep every connection active for approximately 12 minutes.
    1..12 | ForEach-Object {
        $minute = $_

        foreach ($process in $connections) {
            if ($process.HasExited) {
                throw "SFTP process $($process.Id) exited unexpectedly."
            }

            $process.StandardInput.WriteLine("ls .")
            $process.StandardInput.Flush()
        }

        Write-Host "Minute ${minute}: sent requests to all 10 sessions."
        Start-Sleep -Seconds 60
    }
}
finally {
    # Close only the processes created by this test.
    foreach ($process in $connections) {
        if (-not $process.HasExited) {
            $process.StandardInput.Close()

            if (-not $process.WaitForExit(3000)) {
                $process.Kill()
            }
        }

        $process.Dispose()
    }

    Write-Host "Test connections closed."
}

I will execute the following in another PowerShell window to check on concurrency - 

$port = [int](Read-Host "Enter your OIC File Server port")

$connections = @(
    Get-NetTCPConnection -State Established |
        Where-Object { $_.RemotePort -eq $port }
)

$connections |
    Format-Table LocalPort, RemoteAddress, RemotePort, OwningProcess

"Established connections to port ${port}: $($connections.Count)"

I begin by outputting current datetime in both windows - 

I run the concurrency check again at ca. 11:36 -

The test has reached minute 6 - 

Check out the Service Metric

Note the time is UTC i.e. CET -1.

Now set the metric filter to 5 minutes / sum

Here we hit the 10.

Test is now at minute 10 -

Test completes at 11:45 CET / 10:45 UTC - 


Here's a 6 hour view of the metrics -
Note, I ran a similar test, a couple of hours before. Also note how we do not see a line down to 0, after the 2nd test ended. 

Again, be aware the stats are emitted  every 5 minutes, giving us a view of connection concurrency at that particular point in time. 

Let's try the following - I will have the same 10 connections test running for 12 minutes in one window. In other I'll have a shorter test for 20 connections for 3 minutes.

30 concurrent connections - 

Still 30 - 
The short test completes - 

so only 10 connections is use - 

Back in OCI for the service metric - 
Here we see a peak at 14, before falling back to 10. Ergo, the peak of 30 concurrent connections is not highlighted.

Summa Summarum

The metric in its current iteration is useful for highlighting trends, however, due to the 5 minute sampling, it is not able to provide an exact view of concurrent connections. Remember to switch the time window to 5 minutes, and you're good to go! 


















 

Wednesday, November 11, 2026

#1190 - Surfacing HITL Logs in Log Analytics

Introduction 


HITL is being used by lots of our customers, in conjunction with AI Agents.

Recently we released a dedicated OCI Log Analytics dashboard for monitoring your HITL driven workflows. We will delve into the dashboard later; let's start with the pre-requisites - how to get HITL logs to OCI Log Analytics. For that we need a log group, as target for the HITL logs. We also need a parser, which will interpret the log data. Some policies are required for this to function, but, once all is set up, we just need to activate the sending of logs. This we do in the OIC console page for your OIC instance. But let's begin with Log Analytics.

Parser in OCI Log Analytics

This is provided OOTB -

The parser requires a "source" log -

This is an example HITL log file, on which the parser is based.

Back in the parser - 

Here is the example log content - 

{
  "processDefinitionId": "UniqueProcessDefinitionID",
  "processDefinitionName": "UTProcess",
  "processDefinitionTitle": "UTProcess",
  "taskTitle": "User task 1",
  "processDefinitionKey": "OIC_PROJECT_1--01.00.0000--UTProcess",
  "startTime": "2026-05-25T10:49:00.188+00:00",
  "endTime": 1779708077902,
  "processInstanceState": "CREATED",
  "processInstanceId": "UniqueProcessInstanceID",
  "processDefinitionVersion": "01.00.0000",
  "processInstanceDuration": 1938110,
  "activityType": "userTask",
  "activityInstanceState": "COMPLETED",
  "activityInstanceSubState": "INITIATED",
  "activityInstanceDuration": 1936318,
  "activityInstanceId": "UniqueActivityInstanceID",
  "assigneeId": "beb0d855cf9040a3a0f16dUniqueID",
  "assigneeName": "beb0d855cf9040a3a0f16dUniqueID",
  "assigneeType": "USER",
  "activityId": "flow_UniqueActivityID",
  "activityName": "User task 1",
  "taskOutcome": "SUBMIT",
  "faultCode": "ABC123",
  "taskSubtype": "Submit",
  "taskId": "UniqueTaskID",
  "eventTimestamp": 1779708077902,
  "executionId": "UniqueExecutionID",
  "deploymentId": "UniqueDeploymentID",
  "oicProjectId": "OIC_PROJECT_1",
  "updatedTime": null,
  "inputPayload": null,
  "businessKey": "Leave Approval",
  "instanceIdentifier": "ut1",
  "userTaskOutputPayload": {
    "taskExec": {
      "approver": "beb0d855cf9040a3a0fUniqueID",
      "approverDisplayName": "user display name",
      "summary": "",
      "approvedDate": "2026-05-25T11:21:17.577Z",
      "approverComment": "null",
      "assignedDate": "2026-05-25T10:49:01.261Z"
    },
    "taskOutcome": "SUBMIT"
  },
  "outputPayload": null,
  "candidateUsersAndGroups": [
    {
      "name": "sample.user@example.com",
      "type": "USER"
    },
    {
      "name": "sample_group",
      "type": "GROUP"
    }
  ],
  "time": 1779708078285,
  "logGroupOCID": "ocid1.loganalyticsloggroup.oc1.phx.exampleuniqueid",
  "serviceInstanceOCID": "ocid1.processautomationinstance.oc1.phx.exampleuniqueid"
}

As you can see, it includes task name, approver, task outcome etc, as well as the OCID of the OPA service instance.

During the log ingestion process OIC will provide the target log group and the log source.


Create a new Log Group in Log Analytics

Then copy the ocid for future use.


Enable HITL for Log Analytics

This is simple - go to the OCI console page for your OIC instance.


Click Enable and paste the ocid of the log group you just created.

Apply Policy Permissions

Currently HITL runs as part of OPA (Oracle Process Automation). We need to allow this HITL (OPA) instance access to Log Analytics.

I have already enabled such for my OIC instances. I created a dynamic group and added the resource ids of my OIC instances.
This dynamic group will now be augmented with the HITL id. This id can be found in the OCI console for your OIC instance. The entry in the dynamic group should be in the following format -

ALL {resource.id = 'ocid1.processautomationinstance.oc1.phx.nnn'}

The dynamic group is used in a Policy - 

It takes a couple of minutes for the policy to kick in.

After a nice cup of English Breakfast tea - I run an OIC based agent that processes orders. The logic is simple; orders > $1000 need to be manually approved.

I run this a couple of times -

Then move to Log Explorer - 

Check out the HITL Logs - 

Here's the raw log data - 

HITL Dashboard

There is now a HITL dashboard in Log Analytics, let's check it out -

There my 2 tasks, back in the Task list - 

I've approved one of the tasks, let's refresh the dashboard - 

Looks good!

I have one active and one completed instance -

You can check out the queries behind each of the widgets - 

Here is the query - 'Log Source' = 'OCI Integration - HITL Activity Stream Logs' and 'Event Type' = PROCESS | rename 'Process State' as State | stats latest(State) as State by 'Process Name', Instance | stats count(Instance) as 'Instance Count' by State, 'Process Name' | where State not in (created)

Net, net - you can create your own widgets based on your own queries; you can also edit existing queries and save as a different widget.

One thing to note here - the Entity value from the filter is not used. Let's get rid of this, as it may cause confusion. To do this, I duplicate the HITL dashboard and edit the duplicate - 

The Entity is still referenced in the widgets, but we can simply remove it.

Don't enter a value, just click Save changes.


Data is now rendered in the widget - 

Do this for all the widgets - 

I open the original HITL dashboard, to check out the Tasks tab - 

There are 5 widgets - 

  • Tasks by status
  • Tasks by status and workflow
  • Pending tasks by users/groups
  • Completed tasks by approver
  • Tasks by outcome

One thing to note, these tasks are at compartment level; so, if you have 3 OIC instances in your compartment, you could potentially see the aggregation of tasks. as we've already seen there is a serviceInstanceOCID field in the HITL log which can be used to filter on HITL/OPA instance. More about that in a follow-up post.

Summa Summarum

This is a very useful dashboard for those using HITL. It can be exposed to LOB folks easily and avoids having to give them access to OIC/OPA for HITL monitoring purposes.