<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />

Microsoft.ApplicationInsights.DataContracts.DependencyTelemetry

The class that represents information about the collected dependency. Learn more.
public string CommandName { get; set; }

Gets or sets text of SQL command or empty it not applicable.

public string Data { get; set; }

Gets or sets data associated with the current dependency instance. Command name/statement for SQL dependency, URL for http dependency.

public string DependencyKind { get; set; }

Gets or sets the dependency kind, like SQL, HTTP, Azure, etc.

public string DependencyTypeName { get; set; }

Gets or sets the dependency type name.

Gets item type for sampling evaluation.

public string ResultCode { get; set; }

Gets or sets the Result Code.

public string Target { get; set; }

Gets or sets target of dependency call. SQL server name, url host, etc.

public string Type { get; set; }

Gets or sets the dependency type name.

Initializes a new instance of the DependencyTelemetry class.

public DependencyTelemetry(string dependencyName, string data, DateTimeOffset startTime, TimeSpan duration, bool success)

Initializes a new instance of the DependencyTelemetry class with the given dependencyName, data, startTime, duration and success property values.

public DependencyTelemetry(string dependencyTypeName, string target, string dependencyName, string data)

Initializes a new instance of the DependencyTelemetry class with the given dependencyTypeName, target, dependencyName, data property values.

public DependencyTelemetry(string dependencyTypeName, string target, string dependencyName, string data, DateTimeOffset startTime, TimeSpan duration, string resultCode, bool success)

Initializes a new instance of the DependencyTelemetry class with the given dependencyTypeName, target, dependencyName, data, startTime, duration, resultCode and success and property values.

public void SetOperationDetail(string key, object detail)

Sets the operation detail specific against the key specified. Objects set through this method are not automatically serialized and sent to the backend.

public bool TryGetOperationDetail(string key, out object detail)

In specific collectors, objects are added to the dependency telemetry which may be useful to enhance DependencyTelemetry telemetry by ITelemetryInitializer implementations. Objects retrieved here are not automatically serialized and sent to the backend.