NCronJob icon indicating copy to clipboard operation
NCronJob copied to clipboard

[V5] Maybe Rename CorrelationId into OrchestrationId

Open nulltoken opened this issue 10 months ago • 3 comments

Observability brought the concept of Orchestration to identify a root job and all the hierarchy of its dependent jobs.

CorrelationId was existing before but fit exactly the concept of the shared identifier of a unique run of a group of jobs.

CorrelationId is exposed to the consumer through IJobExecutionContext and ExecutionProgress.

How about retiring (through deprecation maybe) CorrelationId and promote a new property OrchestrationId?

nulltoken avatar Mar 02 '25 14:03 nulltoken

Well simply put, we could forward it towards OrchestrationId:

public Guid CorrelationId => OrchestrationId

I like to keep CorrelationId as it is better suited as a name. Web Developers tend to have an idea what that property is about. The only thing is that it should be stable across the dependency lifetime.

As an user of the lib, I want to understand the chain: https://docs.ncronjob.dev/features/model-dependencies/#tracing-requests-of-dependencies-via-correlationid

linkdotnet avatar Mar 02 '25 16:03 linkdotnet

If you prefer CorrelationId over OrchestrationId (from a naming standpoint), let's close this issue.

I don't see any value in having both exposed.

nulltoken avatar Mar 02 '25 17:03 nulltoken

Absolutely - still we could toy with different names. For example TraceId might be better suited.

linkdotnet avatar Mar 02 '25 18:03 linkdotnet