

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# EventBridge 管道日志架构参考
<a name="eb-pipes-logs-schema"></a>

以下参考详细介绍了 Pip EventBridge es 日志记录的架构。

每条日志记录代表一个管道执行步骤，如果已将管道源和目标配置为批处理，最多可包含 10,000 个事件。

有关更多信息，请参阅 [记录 Amazon Pi EventBridge pes 的性能](eb-pipes-logs.md)。

```
{
    "executionId": "guid",
    "timestamp": "date_time",
    "messageType": "execution_step",
    "resourceArn": "arn:aws:pipes:region:account:pipe/pipe-name",
    "logLevel": "TRACE | INFO | ERROR",
    "payload": "{}",
    "awsRequest": "{}"
    "awsResponse":"{}"
    "truncatedFields": ["awsRequest","awsResponse","payload"],
    "error": {
        "httpStatusCode": code,
        "message": "error_message",
        "details": "",
        "awsService": "service_name",
        "requestId": "service_request_id"
    }
}
```

**executionId**  <a name="pipe-log-schema-execution-id"></a>
管道执行的 ID。  
管道执行是管道接收并传递到富集或目标的一个事件或一批事件。有关更多信息，请参阅 [Amazon Pi EventBridge pes 日志的工作原理](eb-pipes-logs.md#eb-pipes-logs-overview)。

**timestamp**  <a name="pipe-log-schema-timestamp"></a>
发出日志事件的日期和时间。  
单位：毫秒

**messageType**  <a name="pipe-log-schema-message-type"></a>
生成记录的管道执行步骤。  
有关管道执行步骤的更多信息，请参阅 [EventBridge 管道执行步骤](eb-pipes-logs-execution-steps.md)。

**resourceArn**  <a name="pipe-log-schema-resource-arn"></a>
管道的 Amazon 资源名称 (ARN)。

**logLevel**  <a name="pipe-log-schema-loglevel"></a>
为管道日志指定的详情级别。  
*有效值*：`ERROR` \$1 `INFO` \$1 `TRACE`  
有关更多信息，请参阅 [指定 EventBridge 管道日志级别](eb-pipes-logs.md#eb-pipes-logs-level)。

**payload**  <a name="pipe-log-schema-payload"></a>
管道正在处理的事件批次的内容。  
EventBridge 仅当您已指定在该管道的日志中包含执行数据时，才包含此字段。有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。  
这些字段可能包含敏感信息。 EventBridge 在记录期间不尝试编辑这些字段的内容。
有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。

**awsRequest**  <a name="pipe-log-schema-aws-request"></a>
发送到富集或目标服务的 JSON 格式的请求 对于发送到 API 目标的请求，表示发送到该端点的 HTTP 请求。  
EventBridge 仅当您已指定在该管道的日志中包含执行数据时，才包含此字段。有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。  
这些字段可能包含敏感信息。 EventBridge 在记录期间不尝试编辑这些字段的内容。
有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。

**awsResponse**  <a name="pipe-log-schema-aws-response"></a>
富集或目标以 JSON 格式返回的响应。对于发送到 API 目标的请求，表示从端点返回的 HTTP 响应，不是 API 目标服务本身返回的响应  
EventBridge 仅当您已指定在该管道的日志中包含执行数据时，才包含此字段。有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。  
这些字段可能包含敏感信息。 EventBridge 在记录期间不尝试编辑这些字段的内容。
有关更多信息，请参阅 [在 Pip EventBridge es 日志中包含执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data)。

**truncatedFields**  <a name="pipe-log-schema-truncated-fields"></a>
为了使记录保持在 256 KB 大小限制以下，所有执行数据字段的列表都 EventBridge 已被截断。  
如果 EventBridge 不必截断任何执行数据字段，则此字段存在，但是。`null`  
有关更多信息，请参阅 [截断 Pipes 日志记录中的 EventBridge 执行数据](eb-pipes-logs.md#eb-pipes-logs-execution-data-truncation)。

**错误**  <a name="pipe-log-schema-error"></a>
包含在此管道执行步骤中生成的任何错误的相关信息。  
如果在此管道执行步骤中未生成错误，该字段仍存在，但为 `null`。    
**httpStatusCode**  <a name="pipe-log-schema-http-status-code"></a>
调用的服务返回的 HTTP 状态代码。  
**message**  <a name="pipe-log-schema-message"></a>
调用的服务返回的错误消息。  
**详细信息**  <a name="pipe-log-schema-details"></a>
调用的服务返回的任何详细错误信息。  
**awsService**  <a name="pipe-log-schema-aws-service"></a>
被调用服务的名称。  
**requestId**  <a name="pipe-log-schema-request-id"></a>
来自被调用服务的此请求的 ID。