Log Logic Apps with an Azure Function
Section titled “ Log Logic Apps with an Azure Function”When the volume is too high for Diagnostics Logging, or you want full control over what is logged, let the workflow log for itself. One shared Azure Function does the work, and no diagnostic setting or REST API call is involved.
- ✅ No diagnostic setting, no diagnostic Event Hub, no REST API reads, no HTTP 429 from them
- ✅ Log Events within seconds, with the names and context you choose
- ✅ One Function shared by all workflows, so the JSON format lives in one place
- ✅ For the highest volumes: no workflow at all, Functions and queues
Diagnostics Logging learns about a run afterwards, from Azure: a diagnostic event through an Event Hub, then the payloads through the Azure REST API (see Log Logic Apps at Scale). There is another way that skips both: the workflow logs for itself. Where logging is required, the workflow calls one shared Azure Function with the message and a few context values. The Function builds a Nodinite JSON Log Event and writes it to an intermediate storage, such as a Service Bus queue, an Event Hub or a Blob container, and the Pickup Log Events Service reads it into Nodinite. This is Custom Logging, with the Function as the shared building block; see About Logic Apps Logging options.
builds the JSON Log Event"] roFn --> roSink["fa:fa-inbox Service Bus, Event Hub or Blob"] roSink --> roPickup["fa:fa-truck-pickup Pickup Service"] roPickup --> roApi["fa:fa-cloud-arrow-down Log API"] roRun -.->|"not needed"| roDiag["fa:fa-ban Diagnostic setting
and REST API fetches"] style roFn fill:#2678BD style roSink fill:#93d16d style roPickup fill:#93d16d style roDiag fill:#d6d6d6
The workflow hands the message to the Function (blue), and the Log Event travels through storage you own to Nodinite (green). No diagnostic setting and no REST API reads are involved (grey).
| Diagnostics Logging | Logging with an Azure Function | |
|---|---|---|
| Workflow change | ✅ None | ⚠️ A call at every point you log |
| Diagnostic setting and Event Hub for diagnostics | ⚠️ Required | ✅ Not needed |
| REST API reads per logged Action | ⚠️ Yes, and HTTP 429 at volume | ✅ None |
| What is logged | What the Logging filters match | Exactly what the workflow sends |
| Delay | Minutes: Azure's diagnostic pipeline | Seconds: as fast as the Pickup Service reads |
| Names and context | From the workflow, Action and tracked properties | Set by the Function: Message Type, Endpoint, correlation id |
| Azure cost | Event Hub and the run history reads | Function executions, the intermediate storage, and one more Action per logging point |
Keep in mind:
- The workflow passes the message to the Function as an Action input, so the run history still stores it for the retention. Logging from the workflow removes the reads, not the storage; see Store less in Azure.
- Call the Function only where the naming policy says to log, and keep it fast: the workflow waits for its answer. A queue between the Function and Nodinite absorbs peaks and Nodinite maintenance.
- The Logic Apps Agent can still monitor the workflows. Only the logging moves to the Function.
- The same AI change that applies the naming policy can add the Function call at the same points; see Apply the naming policy with AI.
- Inside a .NET Function, Serilog with a Nodinite sink writes the JSON Log Event for you.
Go further: replace the workflow with Functions and queues
Section titled “ Go further: replace the workflow with Functions and queues”For the flows with the highest volume, the better design may be no workflow at all. One or more Azure Functions do the work, and they pass the message and its state to each other through queues, such as Azure Service Bus. Nothing writes a run history, so Azure stores no inputs and outputs per Action, and nothing is left for anyone to read back through the Azure REST API.
Functions chained by queues (green): each queue holds the state between two steps and absorbs peaks. Each Function logs exactly what it needs, through Serilog (blue).
| Logic Apps workflow | Functions and queues | |
|---|---|---|
| Stored per run | Every input and output of every Action, for the retention | Only what is in the queues, until it's read |
| Billed per | Action execution (Consumption) or plan (Standard) | Function execution or plan, and queue operations |
| At high volume | Run history storage and the Azure REST API set the limits | The queues and the Functions scale out |
| Connectors and designer | ✅ Hundreds of connectors, low-code designer | ⚠️ Code: you write the integration |
| Troubleshooting | Run history in the Azure portal, for people with Azure access; slow at high volume | ✅ Nodinite Log Views with the payloads, repair and resend, and the queues' dead-letter messages, without Azure access |
| Cost of logging | Run history retention, and Application Insights or Log Analytics per GB | ✅ Serilog to Nodinite, with retention per Message Type; see Reduce Azure Functions Logging Costs |
| Monitoring with Nodinite | Logic Apps Agent | Azure Functions and Service Bus Queues |
Nothing is lost by leaving the run history behind. Nodinite logging and monitoring together do more than the built-in Azure tools, at a lower total cost: see Reduce Azure Functions Logging Costs and Reduce Azure Logic Apps Run History Retention to Lower TCO.
Choose it for flows that run often and do simple, well-known work: receive, validate, map, route and send. Keep Logic Apps for flows with low volume that lean on connectors and the designer. Many solutions mix both.