Share via


IApplicationIdProvider.TryGetApplicationId(String, String) Method

Definition

Retrieves the Application Id to be used for Request.Source or Dependency.Target.

public bool TryGetApplicationId (string instrumentationKey, out string applicationId);
abstract member TryGetApplicationId : string * string -> bool
Public Function TryGetApplicationId (instrumentationKey As String, ByRef applicationId As String) As Boolean

Parameters

instrumentationKey
String

Instrumentation Key string used to lookup associated Application Id.

applicationId
String

Application Id corresponding to the Instrumentation Key. Returns NULL if a match was not found.

Returns

TRUE if Application Id was successfully retrieved; FALSE otherwise.

Remarks

Application Insights data model defines two fields: request.source and dependency.target. The first field identifies the component that initiated the dependency request, and the second identifies which component returned the response of the dependency call. For more information see: https://docs.microsoft.com/azure/application-insights/application-insights-correlation .

Applies to