The way I troubleshot the Function was to:
- Remove ALL ADVANCED FILTERS from the EventGrid trigger
- Attempt upload
- Upload successful
- Look at EventGrid message
- The culprit (though unclear why
ClientOtherError and AuthorizationError are generated here!) seems to be:
- Files pushed to Azure Storage via Azure Data Factory use the
FlushWithClose api.
- These are the only ones I want to grab
- Our automations all use ADF and if you don't have the
FlushWithClose filter in place, your Functions will run 2x (because ADF causes two events on the storage but only one (flush with close) is the actual blob write.)
{
"id": "redact",
"data": {
"api": "FlushWithClose",
"requestId": "redact",
"eTag": "redact",
"contentType": "application/octet-stream",
"contentLength": 87731520,
"contentOffset": 0,
"blobType": "BlockBlob",
"blobUrl": "https://mything.blob.core.windows.net/mything/20201209/yep.csv",
"url": "https://mything.dfs.core.windows.net/mything/20201209/yep.csv",
"sequencer": "0000000000000000000000000000701b0000000000008177",
"identity": "redact",
"storageDiagnostics": {
"batchId": "redact"
}
},
"topic": "/subscriptions/redact/resourceGroups/redact/providers/Microsoft.Storage/storageAccounts/redact",
"subject": "/blobServices/default/containers/mything/blobs/20201209/yep.csv",
"event_type": "Microsoft.Storage.BlobCreated"
}
- Files pushed to Azure Storage via Azure Storage Explorer (and via Azure Portal) use the
PutBlob api.
{
"id": "redact",
"data": {
"api": "PutBlob",
"clientRequestId": "redact",
"requestId": "redact",
"eTag": "redact",
"contentType": "application/vnd.ms-excel",
"contentLength": 1889042,
"blobType": "BlockBlob",
"blobUrl": "https://mything.blob.core.windows.net/thing/yep.csv",
"url": "https://mything.blob.core.windows.net/thing/yep.csv",
"sequencer": "0000000000000000000000000000761d0000000000000b6e",
"storageDiagnostics": {
"batchId": "redact"
}
},
"topic": "/subscriptions/redact/resourceGroups/redact/providers/Microsoft.Storage/storageAccounts/redact",
"subject": "/blobServices/default/containers/thing/blobs/yep.csv",
"event_type": "Microsoft.Storage.BlobCreated"
}
- I was testing locally with ASE instead of using our ADF automations
- Thus the advanced filter for
data.api was not triggering the EventGrid
Ok... but what about the errors?
What are these new errors? How do I create an App Insight alert that catches them?This post focuses onWhat do these errors mean? How do I troubleshoot them?- ericOnline