HealthServiceRequest.SetCorrelationId(Guid) HealthServiceRequest.SetCorrelationId(Guid) HealthServiceRequest.SetCorrelationId(Guid) Method


To allow applications to keep track of calls to platform, the application can optionally set a correlation id. This will be passed up in web requests to HealthVault and used when HealthVault writes to its logs. If issues occur, this id can be used by the HealthVault team to help debug the issue.

For applications, we want to avoid the use of thread local for setting the request id since a single web request is not guaranteed to fully execute on the same thread - using HttpContext.Items is the recommended way.

For non web applications, this method sets a [ThreadStatic] variable which stores the id in thread local storage. All HealthVault requests made on this thread will re-use this variable

public static void SetCorrelationId (Guid correlationId);
static member SetCorrelationId : Guid -> unit
Public Shared Sub SetCorrelationId (correlationId As Guid)


Guid Guid Guid

Applies to