[Engine-devel] REST-API: Exposing correlation-ID

Eoghan Glynn eglynn at redhat.com
Thu May 3 15:15:34 UTC 2012



> Correlation-ID feature allows 'tagging' a call to a Backend command
> with a String ID, and this ID will be appended to all log messages
> that result from this command.
> 
> http://www.ovirt.org/wiki/Features/TaskManagerDetailed
> 
> In REST-API, we would like to enable the user to pass a
> correlation-ID
> when he activates actions.
> 
> I have two questions:
> 
> 1) what's the name you'd give this parameter? job-id? batch-id?
> flow-id? command-id? correlation-id???
> 
> 2) I've already implemented this as a url parameter. Are there
> objections?
> The only viable alternative I see is as an http header, which doesn't
> feel
> right. It's not an option to pass it in the XML body, because
> sometimes
> there is no body, for example, in DELETE commands.

Hi Ori,

Is the intent here to allow correlation between multiple backend actions
initiated from a single restapi call, or an over-arching correlation
across multiple restapi calls?

If the former, then I'd agree with Yaniv, just generate the ID internally
and return it as a response header.

If the latter, then allowing it to be optionally set via a request header,
seems more natural to me than a URL parameter because this is additional
out-of-band data that aids in log interpretation, as opposed to something
directly germane to the interaction with the target resource.

Cheers,
Eoghan




More information about the Engine-devel mailing list