diff --git a/en/asgardeo/docs/assets/img/guides/actions/action-diagnostics-logs-in-ui.png b/en/asgardeo/docs/assets/img/guides/actions/action-diagnostics-logs-in-ui.png new file mode 100644 index 0000000000..488b1052a7 Binary files /dev/null and b/en/asgardeo/docs/assets/img/guides/actions/action-diagnostics-logs-in-ui.png differ diff --git a/en/identity-server/next/docs/includes/action-troubleshooting.md b/en/identity-server/next/docs/includes/action-troubleshooting.md deleted file mode 100644 index 4917a79a5f..0000000000 --- a/en/identity-server/next/docs/includes/action-troubleshooting.md +++ /dev/null @@ -1,88 +0,0 @@ - -```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://example.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://example.com", - "action endpoint authentication type": "BASIC" - }, - "logDetailLevel": "APPLICATION" -} -``` - -The following table gives an explanation to each property included in the diagnostic log event. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyDescription
logId -

Unique ID for each log event

-
recordedAt

Timestamp of log event occurrence

requestId

Unique ID to correlate the log event to a specific request

resultStatus

Status of the log event. Either ‘Success’ or ‘Failed’

resultMessage

Description of the log event

actionId

ID to identify a specific log event

componentId

ID to identify the component where the log event was carried out

configurations

System specific context data relevant to the log event

input

Parameters given by the user which are applicable during the log event

- -To enable diagnostic logs in system configurations, you may add the following configurations to the `deployment.toml` file located in the `/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) - -!!!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 reponses and requests. diff --git a/en/includes/guides/customize/actions/understanding-actions.md b/en/includes/guides/customize/actions/understanding-actions.md index 5a3a28196e..25ac240bcc 100644 --- a/en/includes/guides/customize/actions/understanding-actions.md +++ b/en/includes/guides/customize/actions/understanding-actions.md @@ -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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
logId +

Unique ID for each log event.

+
recordedAt

Timestamp of log event occurrence.

requestId

Unique ID to correlate the log event to a specific request.

resultStatus

Status of the log event. Either ‘Success’ or ‘Failed’.

resultMessage

Description of the log event.

actionId

ID to identify a specific log event.

componentId

ID to identify the component where the log event was carried out.

configurations

System specific context data relevant to the log event.

input

Parameters given by the user which are applicable during the log event.

+ +{% 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 `/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 %}