gpt4 book ai didi

azure - 如何确定 Azure EventGrid 消息传递失败的原因?

转载 作者:行者123 更新时间:2023-12-05 08:04:40 24 4
gpt4 key购买 nike

如何确定 EventGrid 消息传递失败的原因?

到目前为止尝试过:

  • 在 EventGrid 系统主题上设置诊断设置
  • 打开 Log Analytics 并使用以下命令查询 AEGDeliveryFailureLogs
//==================================================//
// Assign variables
//==================================================//
let varStart = ago(5h);
let varEnd = now();
//==================================================//
// Query table
//==================================================//
AegDeliveryFailureLogs
| where TimeGenerated between (varStart .. varEnd)
| project split(Message, ',')
  • 在我的案例中产生了 1700 多条记录
  • 结果示例:
[
"outcome=Aborted",
" latencyInMs=180004",
" id=<redacted>",
" outputEventSystemId=<redacted>",
" state=Filtered",
" deliveryTime=5/26/2021 3:22:01 PM",
" deliveryCount=3",
" probationCount=1",
" deliverySchema=EventGridEvent",
" eventSubscriptionDeliverySchema=EventGridEvent",
" outputEventFields=InputEvent| EventSubscriptionId| DeliveryTime| DeliveryCount| State| Id| ProbationCount| LastDeliveryOutcome| DeliverySchema| LastDeliveryAttemptTime| SystemId| UseMappedResourceArmIdForBilling",
" outputEventFieldCount=12",
" requestExpiration=5/26/2021 3:23:01 PM",
" delivered=False id=<redacted>",
" inputEventSystemId=<redacted> publishTime=5/26/2021 3:14:42 PM",
" eventTime=5/26/2021 3:14:42 PM",
" eventType=Microsoft.Storage.BlobCreated",
" deliveryTime=1/1/0001 12:00:00 AM",
" filteringState=FilteringPending",
" inputSchema=EventGridEvent",
" publisher=MICROSOFT-STORAGE-STORAGEACCOUNTS.<redacted>.EVENTGRID.AZURE.NET",
" size=1162",
" subject=/blobServices/default/containers/<redacted>/blobs/2021-05-25/<redacted>/<redacted>.csv",
" inputEventFields=Id| PublishTime| SerializedBody| EventType| Topic| Subject| FilteringHashCode| SystemId| Publisher| FilteringTopic| TopicCategory| DataVersion| MetadataVersion| InputSchema| EventTime| FilteringPolicy",
" inputEventFieldCount=16",
" type=AzureFunction",
" subType=NotApplicable",
" supportsBatching=False",
" aadIntegration=False",
" useSystemIdentity=False",
"armId=/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Web/sites/<redacted>/functions/<redacted>",
" deliveryResponse=",
" httpStatusCode=InternalServerError",
" errorType=UnexpectedError",
" errorMessage=An unexpected error has occurred. Please report the x-ms-request-id header value to our forums for assistance or raise a support ticket.",
" errorMessage=The operation timed out after: 00:03:00"
]

有一个明确的 outcome=Aborted 以及 httpStatusCode/errorType/errorMessage 表明存在问题,但这就是调查停止的地方。

是什么导致了这些 EventGrid 消息问题以及如何确定原因?

最佳答案

确定事件网格消息发送失败的原因唯一方法似乎是打开死信。

这是一个死信消息示例。

  • 它清楚地显示了 deadLetterReason 和其他一些有值(value)的调试信息:
[
{
"id": "redacted",
"eventTime": "2021-06-07T22:52:42.7156553Z",
"eventType": "Microsoft.Storage.BlobCreated",
"dataVersion": "",
"metadataVersion": "1",
"topic": "/subscriptions/redacted/resourceGroups/redacted/providers/Microsoft.Storage/storageAccounts/redacted",
"subject": "/blobServices/default/containers/redacted/blobs/20210525/redacted.csv",
"deadLetterReason": "TimeToLiveExceeded",
"deliveryAttempts": 12,
"lastDeliveryOutcome": "TimedOut",
"publishTime": "2021-06-07T22:52:43.1497044Z",
"lastDeliveryAttemptTime": "2021-06-08T21:50:11.3677712Z",
"data": {
"api": "PutBlockList",
"clientRequestId": "redacted",
"requestId": "redacted",
"eTag": "0x8D92A06F5883BA6",
"contentType": "application/octet-stream",
"contentLength": 4767672448,
"blobType": "BlockBlob",
"blobUrl": "https://redacted.blob.core.windows.net/redacted/20210525/redacted.csv",
"url": "https://redacted.blob.core.windows.net/redacted/20210525/redacted.csv",
"sequencer": "000000000000000000000000000093100000000000001286",
"storageDiagnostics": {
"batchId": "redacted"
}
}
}
]

关于azure - 如何确定 Azure EventGrid 消息传递失败的原因?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67711129/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com