Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Azure Logic Apps (Consumption)
Note
This article applies only to Consumption logic app workflows. For Standard logic app workflows, see:
After you set up B2B communication between trading partners in an integration account, these partners can exchange messages by using protocols such as AS2, X12, and EDIFACT. To confirm that this communication works as expected, set up Azure Monitor logs for your integration account.
Azure Monitor helps you monitor your cloud and on-premises environments so that you can more easily maintain their availability and performance. By using Azure Monitor logs, you can record and store data about runtime data and events, such as trigger events, run events, and action events in a Log Analytics workspace.
For messages, logging also collects the following information:
- Message count and status
- Acknowledgments status
- Correlations between messages and acknowledgments
- Detailed error descriptions for failures
Azure Monitor lets you create log queries that help you find and review this information. You can also use this diagnostics data with other Azure services, such as Azure Storage and Azure Event Hubs.
This guide shows how to set up Azure Monitor logging for your integration account. You first install the Logic Apps B2B solution in the Azure portal. This solution provides aggregated information for B2B message events. Then, to enable logging and creating queries, you learn how to set up Azure Monitor logs.
For more information, see:
- Azure Monitor overview
- Azure Monitor Logs overview
- Resource log destinations
- Log queries in Azure Monitor
- Send diagnostic data to Azure Storage and Azure Event Hubs
Note
This article was recently updated to use the term Azure Monitor logs instead of Log Analytics. Log data is still stored in a Log Analytics workspace and is still collected and analyzed by the same Log Analytics service. We are updating the terminology to better reflect the role of logs in Azure Monitor. See Azure Monitor terminology changes for details.
Prerequisites
An Azure account with an active subscription. If you don't have a subscription, create a free account.
A Log Analytics workspace. If you don't have a Log Analytics workspace, see Create a Log Analytics workspace.
A Consumption logic app resource that's set up Azure Monitor logging and has a workflow with the B2B messages that you want to monitor.
Your workflow sends logging information to a Log Analytics workspace or another destination that you want.
An integration account that's linked to your logic app resource.
Install Logic Apps B2B solution
Before Azure Monitor logs can track the B2B messages for your logic app, add the Logic Apps B2B solution to your Log Analytics workspace.
In the Azure portal search box, enter log analytics workspaces, and then select Log Analytics workspaces.
Under Log Analytics workspaces, select your workspace.
On the Overview page, under Get started with Log Analytics > Configure monitoring solutions, select View solutions.
On the Overview page, select Add.
After the Marketplace opens, in the search box, enter logic apps b2b, and select Logic Apps B2B.
On the solution description pane, select Create.
Review and confirm the Log Analytics workspace where you want to install the solution, and select Create again.
Azure deploys the solution to the Azure resource group that contains your Log Analytics workspace.
Go to your Log Analytics workspace, On the Overview page, on the Get Started tab, select View solutions again to see the installed solution. Select the solution tile to view more message details.
When the workflow processes B2B messages, the charts update with the message count.
Set up Azure Monitor logs
You can enable Azure Monitor logging directly from your integration account.
In the Azure portal, find and select your integration account.
On the integration account sidebar, under Monitoring, select Diagnostic settings. Under the Diagnostic settings table, select Add diagnostic setting.
To create the setting, follow these steps:
For Diagnostic setting name, provide a name.
Under Destination details, select Send to Log Analytics workspace.
For Subscription, select the Azure subscription for your Log Analytics workspace.
For Log Analytics Workspace, select the workspace that you want to use.
Under Logs, select Integration Account tracking events, which specifies the event category that you want to record.
When you're done, on the toolbar, select Save.
For example:
View message status
After your workflow runs, you can view the status and data about any B2B messages exchanged by partners.
In the Azure portal search box, find and open the resource group for your Log Analytics workspace.
From the resource group, select the Logic Apps B2B solution that you previously installed.
From the solution sidebar, select Summary.
Note
If the Logic Apps B2B tile doesn't immediately show results after a run, try refreshing the browser or wait for a short time before trying again.
By default, the Logic Apps B2B tile shows data based on a single day. To change the data scope to a different interval, select the scope control at the top of the page:
After the message status dashboard appears, you can view more details for a specific message type, which shows data based on a single day. Select the tile for AS2, X12, or EDIFACT.
A list of messages appears for your chosen tile. For example, here's what an AS2 message list might look like:
To learn more about the properties for each message type, see these message property descriptions:
Property descriptions and name formats for AS2, X12, and EDIFACT messages
For each message type, here are the property descriptions and name formats for downloaded message files.
AS2 message property descriptions
Here are the property descriptions for each AS2 message.
| Property | Description |
|---|---|
| Sender | The guest partner specified in Receive Settings, or the host partner specified in Send Settings for an AS2 agreement |
| Receiver | The host partner specified in Receive Settings, or the guest partner specified in Send Settings for an AS2 agreement |
| Logic App | The logic app where the AS2 actions are set up |
| Status | The AS2 message status Success = Received or sent a valid AS2 message. No Message Disposition Notification (MDN) is set up. Success = Received or sent a valid AS2 message. MDN is set up and received, or MDN is sent. Failed = Received an invalid AS2 message. No MDN is set up. Pending = Received or sent a valid AS2 message. MDN is set up, and MDN is expected. |
| ACK | The MDN message status Accepted = Received or sent a positive MDN. Pending = Waiting to receive or send an MDN. Rejected = Received or sent a negative MDN. Not Required = MDN isn't set up in the agreement. |
| Direction | The AS2 message direction |
| Tracking ID | The ID that correlates all the triggers and actions in a logic app |
| Message ID | The AS2 message ID from the AS2 message headers |
| Timestamp | The time when the AS2 action processed the message |
X12 message property descriptions
Here are the property descriptions for each X12 message.
| Property | Description |
|---|---|
| Sender | The guest partner specified in Receive Settings, or the host partner specified in Send Settings for an X12 agreement |
| Receiver | The host partner specified in Receive Settings, or the guest partner specified in Send Settings for an X12 agreement |
| Logic App | The logic app where the X12 actions are set up |
| Status | The X12 message status Success = Received or sent a valid X12 message. No functional ack is set up. Success = Received or sent a valid X12 message. Functional ack is set up and received, or a functional ack is sent. Failed = Received or sent an invalid X12 message. Pending = Received or sent a valid X12 message. Functional ack is set up, and a functional ack is expected. |
| ACK | Functional Ack (997) status Accepted = Received or sent a positive functional ack. Rejected = Received or sent a negative functional ack. Pending = Expecting a functional ack but not received. Pending = Generated a functional ack but can't send to partner. Not Required = Functional ack isn't set up. |
| Direction | The X12 message direction |
| Tracking ID | The ID that correlates all the triggers and actions in a logic app |
| Msg Type | The EDI X12 message type |
| ICN | The Interchange Control Number for the X12 message |
| TSCN | The Transaction Set Control Number for the X12 message |
| Timestamp | The time when the X12 action processed the message |
EDIFACT message property descriptions
Here are the property descriptions for each EDIFACT message.
| Property | Description |
|---|---|
| Sender | The guest partner specified in Receive Settings, or the host partner specified in Send Settings for an EDIFACT agreement |
| Receiver | The host partner specified in Receive Settings, or the guest partner specified in Send Settings for an EDIFACT agreement |
| Logic App | The logic app where the EDIFACT actions are set up |
| Status | The EDIFACT message status Success = Received or sent a valid EDIFACT message. No functional ack is set up. Success = Received or sent a valid EDIFACT message. Functional ack is set up and received, or a functional ack is sent. Failed = Received or sent an invalid EDIFACT message Pending = Received or sent a valid EDIFACT message. Functional ack is set up, and a functional ack is expected. |
| ACK | Functional Ack (CONTRL) status Accepted = Received or sent a positive functional ack. Rejected = Received or sent a negative functional ack. Pending = Expecting a functional ack but not received. Pending = Generated a functional ack but can't send to partner. Not Required = Functional Ack isn't set up. |
| Direction | The EDIFACT message direction |
| Tracking ID | The ID that correlates all the triggers and actions in a logic app |
| Msg Type | The EDIFACT message type |
| ICN | The Interchange Control Number for the EDIFACT message |
| TSCN | The Transaction Set Control Number for the EDIFACT message |
| Timestamp | The time when the EDIFACT action processed the message |