1

We're using ASP.NET Web API and Azure Service Bus and adding logging to our disparate services and systems. We need to track a correlation ID to the headers of each set of bus messages as well as logs related to a single business workflow/sequence together together. I'm just trying to nail down what this should be called. So basically it ties together the logs of a single business process hitting multiple servers. The originator of the specifications used "EventID". In past projects I've seen "RequestId", "SessionId", "ContextId", and I suppose we could also use "WorkflowId", "ActivityId", "CorrelationId", etc.

More specifically, since this would otherwise be a completely subjective call, is there any known and published industry standard that calls out a convention for what to call this thing?

My question comes from ignorance about ESB convention and thought perhaps there is a conventional header name used for this purpose.

  • 1
    Which name, if you looked at it later, would best remind you of its purpose? – Robert Harvey May 24 '16 at 22:52
  • I've seen it called CorrelationID and TraceID. – John Wu Feb 15 '17 at 22:08
  • If you are facing distributed transactions, what about transactionId ? Or ExecutionId, ProcessId,... – Laiv Jul 16 '17 at 8:56
1

I like to go with CorrelationID, if only because I learned the concept from NServiceBus.

But the best possible name for your team to use is whatever the team is likely to call the concept when speaking with each other (ubiquitous language and all that.) The worst possible case would be if you called it "CorrelationID" (for example) in code, but the team all decided to call it "WorkflowID."

Pick something everyone can settle on, and the team wins.

|improve this answer|||||
  • 1
    +1 ubiquitous language and all that the team should speak the very same language. So get consensus. – Laiv Jul 16 '17 at 8:57
1

If you look into http://www.enterpriseintegrationpatterns.com/patterns/messaging/CorrelationIdentifier.html the recommenctation is CorrelationId. If your logical process is bound to RequestId and the Request is something you will refer to then you know what to use.

My advice is that your team should choose a name that is:

  1. Describing exactly what is the information in that field
  2. Is understood by all developers during software life-time (so like after 5y from now) in the same way.
  3. It would be nice that the name you decided to use is industry standard. This help maintainers in future
|improve this answer|||||
0

I've always used CorrelationID. I don't know how I came up with it, but I've seen it around elsewhere since I started with it (and... here it is again!)

Makes sense to me... it implies this correlates something, but it could be a number of things, so it has a generic name.

That pretty much tells me everything I need to know about it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.