Class RemoteDependencyTelemetry

java.lang.Object
com.microsoft.applicationinsights.telemetry.BaseTelemetry
com.microsoft.applicationinsights.telemetry.RemoteDependencyTelemetry
All Implemented Interfaces:
Telemetry

public final class RemoteDependencyTelemetry extends BaseTelemetry
Telemetry sent to Azure Application Insights about dependencies - that is, calls from your application to external services such as databases or REST APIs.
  • Constructor Details

    • RemoteDependencyTelemetry

      public RemoteDependencyTelemetry(String dependencyName, String commandName, Duration duration, boolean success)
      Creates a new instance with the given parameters.
      Parameters:
      dependencyName - The dependency name.
      commandName - The command name or call details.
      duration - How long it took to process the call.
      success - Whether the remote call successful or not.
    • RemoteDependencyTelemetry

      public RemoteDependencyTelemetry(String name)
      Creates a new instance with the given name.
    • RemoteDependencyTelemetry

      public RemoteDependencyTelemetry()
  • Method Details

    • getId

      public String getId()
      Gets the dependency id.
    • setId

      public void setId(String value)
      Sets the dependency id.
    • getName

      public String getName()
      Gets the dependency name.
    • setName

      public void setName(String name)
      Sets the dependency name.
    • getCommandName

      public String getCommandName()
      Gets the command name.
    • setCommandName

      public void setCommandName(String commandName)
      Sets the command name.
    • getType

      public String getType()
      Gets the type property.
    • setType

      public void setType(String value)
      Sets the type property.
    • getTarget

      public String getTarget()
      Gets the target of this dependency.
    • setTarget

      public void setTarget(String value)
      Sets the target of this dependency.
    • setResultCode

      public void setResultCode(String value)
    • getSuccess

      public boolean getSuccess()
      Gets the Success property.
    • setSuccess

      public void setSuccess(boolean value)
      Sets the Success property.
    • getDuration

      public Duration getDuration()
      Gets the duration.
    • setDuration

      public void setDuration(Duration duration)
      Sets the duration.
    • getResultCode

      public String getResultCode()
    • getMetrics

      public Map<String,Double> getMetrics()
      Gets a map of application-defined request metrics.
    • getData

      protected RemoteDependencyData getData()
      Specified by:
      getData in class BaseTelemetry