Ignore Azure event chain id and 'Begin' events?


An event in Azure is broken down into two - a ‘Begin’ event and an ‘End’ event, both share a chain id. In ManageIQ we correlate these 2 events using the chain_id and create a rollup ‘Complete’ event. The challenge is the chain_id column in the ManageIQ DB is a big int, the chain Id we pull from the Azure event is a UID (string) so i am trying to figure out our options.

I have noticed we do not parse a chain_id from events from most other providers, is that because a second (‘End’) event is never fired making the need for a rollup event unnecessary? What will happen if I ignore both the chain_id and the ‘Begin’ event in Azure and only process ‘End’ events (which indicates the action the event relates to was completed successfully)? This would mean a ‘Complete’ event would never be created automatically.

CC @fryguy @blomquisg @lfu


If you have an “End” event, you don’t need to create a “Complete” event. We only need to do that on VMware because they don’t have an “End” event.

I think we could switch it to a string without problems. I haven’t really looked at the code if it’s 100% possible, but I would not object to the idea.

It’s not parsed in other providers because they don’t have chains of events.

We only need to create a “Complete” event for VMware, because otherwise there would be no event that someone could handle when that chain is completed. In your case, you have an “End” event, so a handler could be written for that “End” event directly.


Great - thanks @Fryguy . I will ignore the chain ID and process only the ‘End’ event, therefore I will not need to change the chain_id column type.


To your point though, it is good information to have the chain id in there…You may not need it for a first pass, but we should consider adding it in a follow up pass.