Skip to content

Commit

Permalink
Update reviewed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
osandamaleesha committed Oct 24, 2024
1 parent 5022029 commit a877737
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 92 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 0 additions & 88 deletions en/identity-server/next/docs/includes/action-troubleshooting.md

This file was deleted.

108 changes: 104 additions & 4 deletions en/includes/guides/customize/actions/understanding-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,115 @@ Requests will not be retried if the external service responds with HTTP status c

### Troubleshooting

You can use diagnostic logs to capture requests sent from the identity server, responses received from your external service, the status and context data for response processing, helping you monitor and troubleshoot issues efficiently . Each event entry provides key details like timestamps, result status, result message, error codes and other relevant context.
You can use diagnostic logs to capture detailed information during the troubleshooting process. Log captures requests sent from the Identity Server to your external action service, track the responses received, and include status and context data for response handling.

Below is an example of a diagnostic log generated during the Pre Issue Access Token action flow sending the request initiated in the identity server to the external endpoint.
Below is an example of a diagnostic log generated during the pre-issue access token action flow, while sending the request initiated in the identity server to the external endpoint.

{% if product_name == "WSO2 Identity Server" %}
{% include "../../../../identity-server/next/docs/includes/action-troubleshooting.md" %}
```json
{
"logId": "582befe9-6114-4362-8fd4-05496e639fb8",
"recordedAt": {
"seconds": 1729488306,
"nanos": 479103000
},
"requestId": "d9b5f323-79cb-4a9e-9d84-f83ab7056122",
"resultStatus": "SUCCESS",
"resultMessage": "Call external service endpoint https://myextension.com for Pre Issue Access Token action.",
"actionId": "process-action-request",
"componentId": "action-execution",
"configurations": {
"action id": "0ab318c4-af38-4190-ae41-75f35ecdf7b6",
"action type": "Pre Issue Access Token",
"action endpoint": "https://myextension.com",
"action endpoint authentication type": "BASIC"
},
"logDetailLevel": "APPLICATION"
}
```
{%else %}

![Asgardeo logs]({{base_path}}/assets/img/guides/asgardeo-logs/diagnostic-logs-display.png){: width="600" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
![Asgardeo logs]({{base_path}}/assets/img/guides/actions/action-diagnostics-logs-in-ui.png){: width="600" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}

{%endif %}

The following table gives an explanation to each property included in the diagnostic log event.

<table>
<thead>
<tr class="header">
<th>Property</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>logId</td>
<td>
<p>Unique ID for each log event.</p>
</td>
</tr>
<tr class="even">
<td>recordedAt</td>
<td><p>Timestamp of log event occurrence.</p></td>
</tr>
<tr class="odd">
<td>requestId</td>
<td><p>Unique ID to correlate the log event to a specific request.</p></td>
</tr>
<tr class="even">
<td>resultStatus</td>
<td><p>Status of the log event. Either ‘Success’ or ‘Failed’.</p></td>
</tr>
<tr class="odd">
<td>resultMessage</td>
<td><p>Description of the log event.</p></td>
</tr>
<tr class="even">
<td>actionId</td>
<td><p>ID to identify a specific log event.</p></td>
</tr>
<tr class="odd">
<td>componentId</td>
<td><p>ID to identify the component where the log event was carried out.</p></td>
</tr>
<tr class="even">
<td>configurations</td>
<td><p>System specific context data relevant to the log event.</p></td>
</tr>
<tr class="odd">
<td>input</td>
<td><p>Parameters given by the user which are applicable during the log event.</p></td>
</tr>
</tbody>
</table>

{% if product_name == "WSO2 Identity Server" %}

To enable diagnostic logs in system configurations, you may add the following configurations to the `deployment.toml` file located in the `<IS_HOME>/repository/conf` directory.

```toml
[server]
diagnostic_log_mode = "full"
```

!!!note
`[server]` is already defined in the `deployment.toml` file. So you just need to add the value.

Additionally, you may use system debug logs to capture similar context information mentioned above. You can enable it component wise by following the steps described [here.]({{base_path}}/deploy/monitor/monitor-logs/#enable-logs-for-a-component)

For an example, your configuration should look like below.

```
logger.org-wso2-carbon-identity-action-execution.name=org.wso2.carbon.identity.action.execution
logger.org-wso2-carbon-identity-action-execution.level=DEBUG
loggers = org-wso2-carbon-identity-action-execution
```

!!!note
It is highly recommended to disable both diagnostic logs and system debug logs once troubleshooting is completed as it may expose sensitive information included in responses and requests.

{%else %}
You may view the diagnostics logs under the logs tab in Asgardeo. [Refer here]({{base_path}}/guides/asgardeo-logs/diagnostic-logs/) to learn more about diagnostic logs in Asgardeo.
{%endif %}

0 comments on commit a877737

Please sign in to comment.