Microsoft.ApplicationInsights.DataContracts.DependencyTelemetry
public sealed class DependencyTelemetry : OperationTelemetry, ITelemetry, ISupportProperties, ISupportAdvancedSampling, ISupportSampling, ISupportMetrics, IAiSerializableTelemetry
The class that represents information about the collected dependency.
Learn more.
Gets or sets text of SQL command or empty it not applicable.
Gets or sets data associated with the current dependency instance. Command name/statement for SQL dependency, URL for http dependency.
Gets or sets the dependency kind, like SQL, HTTP, Azure, etc.
Gets or sets the dependency type name.
Gets item type for sampling evaluation.
Gets or sets the Result Code.
Gets or sets target of dependency call. SQL server name, url host, etc.
Gets or sets the dependency type name.
public DependencyTelemetry()
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.
Sets the operation detail specific against the key specified. Objects set through this method
are not automatically serialized and sent to the backend.
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.