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 Summary
Constructors Constructor Description RemoteDependencyTelemetry()
RemoteDependencyTelemetry(java.lang.String name)
Creates a new instance with the givenname
.RemoteDependencyTelemetry(java.lang.String dependencyName, java.lang.String commandName, Duration duration, boolean success)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCommandName()
Gets the command name.protected RemoteDependencyData
getData()
Duration
getDuration()
Gets the duration.java.lang.String
getId()
Gets the dependency id.java.util.Map<java.lang.String,java.lang.Double>
getMetrics()
Gets a map of application-defined request metrics.java.lang.String
getName()
Gets the dependency name.java.lang.String
getResultCode()
boolean
getSuccess()
Gets the Success property.java.lang.String
getTarget()
Gets the target of this dependency.java.lang.String
getType()
Gets the type property.void
setCommandName(java.lang.String commandName)
Sets the command name.void
setDuration(Duration duration)
Sets the duration.void
setId(java.lang.String value)
Sets the dependency id.void
setName(java.lang.String name)
Sets the dependency name.void
setResultCode(java.lang.String value)
void
setSuccess(boolean value)
Sets the Success property.void
setTarget(java.lang.String value)
Sets the target of this dependency.void
setType(java.lang.String value)
Sets the type property.-
Methods inherited from class com.microsoft.applicationinsights.telemetry.BaseTelemetry
getContext, getProperties, getTimestamp, initialize, setTimestamp
-
-
-
-
Constructor Detail
-
RemoteDependencyTelemetry
public RemoteDependencyTelemetry(java.lang.String dependencyName, java.lang.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(java.lang.String name)
Creates a new instance with the givenname
.
-
RemoteDependencyTelemetry
public RemoteDependencyTelemetry()
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the dependency id.
-
setId
public void setId(java.lang.String value)
Sets the dependency id.
-
getName
public java.lang.String getName()
Gets the dependency name.
-
setName
public void setName(java.lang.String name)
Sets the dependency name.
-
getCommandName
public java.lang.String getCommandName()
Gets the command name.
-
setCommandName
public void setCommandName(java.lang.String commandName)
Sets the command name.
-
getType
public java.lang.String getType()
Gets the type property.
-
setType
public void setType(java.lang.String value)
Sets the type property.
-
getTarget
public java.lang.String getTarget()
Gets the target of this dependency.
-
setTarget
public void setTarget(java.lang.String value)
Sets the target of this dependency.
-
setResultCode
public void setResultCode(java.lang.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 java.lang.String getResultCode()
-
getMetrics
public java.util.Map<java.lang.String,java.lang.Double> getMetrics()
Gets a map of application-defined request metrics.
-
getData
protected RemoteDependencyData getData()
- Specified by:
getData
in classBaseTelemetry
-
-