TelemetryClient.TrackDependency Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TrackDependency(DependencyTelemetry) |
Send information about external dependency call in the application. Create a separate DependencyTelemetry instance for each call to TrackDependency(DependencyTelemetry). |
TrackDependency(String, String, DateTimeOffset, TimeSpan, Boolean) |
Obsolete.
Send information about an external dependency (outgoing call) in the application. |
TrackDependency(String, String, String, DateTimeOffset, TimeSpan, Boolean) |
Send information about an external dependency (outgoing call) in the application. |
TrackDependency(String, String, String, String, DateTimeOffset, TimeSpan, String, Boolean) |
Send information about an external dependency (outgoing call) in the application. |
TrackDependency(DependencyTelemetry)
Send information about external dependency call in the application. Create a separate DependencyTelemetry instance for each call to TrackDependency(DependencyTelemetry).
public void TrackDependency (Microsoft.ApplicationInsights.DataContracts.DependencyTelemetry telemetry);
member this.TrackDependency : Microsoft.ApplicationInsights.DataContracts.DependencyTelemetry -> unit
Public Sub TrackDependency (telemetry As DependencyTelemetry)
Parameters
- telemetry
- DependencyTelemetry
Remarks
Applies to
TrackDependency(String, String, DateTimeOffset, TimeSpan, Boolean)
Caution
Please use a different overload of TrackDependency
Send information about an external dependency (outgoing call) in the application.
[System.Obsolete("Please use a different overload of TrackDependency")]
public void TrackDependency (string dependencyName, string data, DateTimeOffset startTime, TimeSpan duration, bool success);
[<System.Obsolete("Please use a different overload of TrackDependency")>]
member this.TrackDependency : string * string * DateTimeOffset * TimeSpan * bool -> unit
Public Sub TrackDependency (dependencyName As String, data As String, startTime As DateTimeOffset, duration As TimeSpan, success As Boolean)
Parameters
- dependencyName
- String
Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
- data
- String
Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
- startTime
- DateTimeOffset
The time when the dependency was called.
- duration
- TimeSpan
The time taken by the external dependency to handle the call.
- success
- Boolean
True if the dependency call was handled successfully.
- Attributes
Remarks
Applies to
TrackDependency(String, String, String, DateTimeOffset, TimeSpan, Boolean)
Send information about an external dependency (outgoing call) in the application.
public void TrackDependency (string dependencyTypeName, string dependencyName, string data, DateTimeOffset startTime, TimeSpan duration, bool success);
member this.TrackDependency : string * string * string * DateTimeOffset * TimeSpan * bool -> unit
Public Sub TrackDependency (dependencyTypeName As String, dependencyName As String, data As String, startTime As DateTimeOffset, duration As TimeSpan, success As Boolean)
Parameters
- dependencyTypeName
- String
External dependency type. Very low cardinality value for logical grouping and interpretation of fields. Examples are SQL, Azure table, and HTTP.
- dependencyName
- String
Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
- data
- String
Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
- startTime
- DateTimeOffset
The time when the dependency was called.
- duration
- TimeSpan
The time taken by the external dependency to handle the call.
- success
- Boolean
True if the dependency call was handled successfully.
Remarks
Applies to
TrackDependency(String, String, String, String, DateTimeOffset, TimeSpan, String, Boolean)
Send information about an external dependency (outgoing call) in the application.
public void TrackDependency (string dependencyTypeName, string target, string dependencyName, string data, DateTimeOffset startTime, TimeSpan duration, string resultCode, bool success);
member this.TrackDependency : string * string * string * string * DateTimeOffset * TimeSpan * string * bool -> unit
Public Sub TrackDependency (dependencyTypeName As String, target As String, dependencyName As String, data As String, startTime As DateTimeOffset, duration As TimeSpan, resultCode As String, success As Boolean)
Parameters
- dependencyTypeName
- String
External dependency type. Very low cardinality value for logical grouping and interpretation of fields. Examples are SQL, Azure table, and HTTP.
- target
- String
External dependency target.
- dependencyName
- String
Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
- data
- String
Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
- startTime
- DateTimeOffset
The time when the dependency was called.
- duration
- TimeSpan
The time taken by the external dependency to handle the call.
- resultCode
- String
Result code of dependency call execution.
- success
- Boolean
True if the dependency call was handled successfully.