arcus-azure / arcus.eventgrid

Azure Event Grid development in a breeze
https://eventgrid.arcus-azure.net/
MIT License
17 stars 6 forks source link

Provide logging in case event id was not found & case-insensitive event id lookup #70

Closed tomkerkhove closed 5 years ago

tomkerkhove commented 5 years ago

Provide logging in case event id was not found to improve troubleshooting.

tomkerkhove commented 5 years ago

Real issue will be fixed later on, @MassimoC will create an issue for it

tomkerkhove commented 5 years ago

@massimoc Would you mind giving the preview package on MyGet a go, please?

You can find them on https://www.myget.org/F/arcus/api/v3/index.json

tomkerkhove commented 5 years ago

Test:Warning: Event was received without an event id. Payload : "id": "6418ce0a-98cd-4092-850d-4a196735f687", "subject": "/ticketing/orders/12345678", "data": { "OrderId": "12345678", "Recipient": "xyz@gmail.com" }, "eventType": "event://order.completed", "eventTime": "2019-04-02T11:59:34.4814942Z", "dataVersion": "1.0", "metadataVersion": "1", "topic": "/subscriptions/f0069721-5573-48fc-a115-4e4d60400b09/resourceGroups/data-paas-rg/providers/Microsoft.EventGrid/topics/ticketingevents"

It doesn't log a valid JSON, will improve this

tomkerkhove commented 5 years ago

Logs are now improved and look like this:

2019-04-03T06:22:25 Warning > Event was received without an event id. Payload : { "EventType": "Arcus.Samples.Cars.NewCarRegistered", "Data": { "LicensePlate": "1-TOM-337" }, "EventTime": "2019-04-03T08:22:08.1809506+02:00", "Id": "7616dbac-fa8a-40ea-8dcb-1f91420a4389", "Subject": "integration-test", "DataVersion": "1", "MetadataVersion": "1", "Topic": "/subscriptions/0329dd2a-59dc-4493-aa54-cb01cb027dc2/resourceGroups/arcus/providers/Microsoft.EventGrid/topics/Arcus-Infrastructure" }

Also added case-insensitive lookups for event id.

@massimoc your issue should be resolved now, feel free to try this new preview package.