UNC日志上报 icon

UNC日志上报

UNC日志上报

Overview

This node, named "UNC日志上报" (UNC Log Reporting), is designed to report the status of tasks at various phases within a workflow. It collects task-related information such as the task ID, current phase, phase status, and overall task status, then sends this data to an external reporting API endpoint. This node is useful in scenarios where monitoring and logging of task progress and outcomes are required, for example, in ETL pipelines or data processing workflows where tracking each stage's success or failure is critical.

Practical examples include:

  • Reporting the creation, crawling, or extraction phases of a data processing task.
  • Tracking whether each phase is completed successfully, ongoing, or failed.
  • Sending detailed logs or metadata about the current phase to a centralized monitoring service.

Properties

Name Meaning
任务阶段 The current phase of the task. Options: 创建 (NEW), 采集 (CRAWL), 解析 (EXTRACT)
阶段状态 The status of the current phase. Options: 完成 (DONE_SUCCESS), 进行中 (DOING), 失败 (DONE_FAIL)
任务状态 The overall status of the task. Options: 已采集 (DONE_CRAWL), 已解析 (DONE_EXTRACT), 完成 (DONE_SUCCESS), 进行中 (DOING), 失败 (DONE_FAIL)

Output

The node outputs a JSON object that includes:

  • task_id: The identifier of the task being reported.
  • All input JSON fields from the incoming data, merged into the output.
  • A report field containing the response data returned by the external reporting API after submitting the task status.

If an error occurs during execution, the output will contain the original input JSON along with an error field describing the issue.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential to authenticate with the external reporting service.
  • Uses the Axios HTTP client library to send POST requests to the configured reporting API endpoint.
  • The API endpoint URL is obtained from the credentials configuration.
  • The node expects to be part of a workflow where it can access upstream nodes, particularly those identified as webhook triggers, to extract the task ID from their output.

Troubleshooting

  • Missing or invalid API credentials: Ensure the API key credential is correctly configured and has access to the reporting service.
  • Task ID not found: The node attempts to retrieve the task ID from upstream webhook nodes or input data. If none is found, it falls back to the execution ID. Verify that the task ID is properly passed through the workflow.
  • Network or API errors: If the POST request fails, the node captures the error and includes it in the output. Check network connectivity and API endpoint availability.
  • Incorrect property values: Make sure the selected options for task phase, phase status, and task status are valid and consistent with the expected workflow states.

Links and References

Discussion