Share via


BotTelemetryClient Interface

public interface BotTelemetryClient

Logging client for Bot Telemetry.

Method Summary

Modifier and Type Method and Description
abstract void flush()

Flushes the in-memory buffer and any metrics being pre-aggregated.

default void trackAvailability(String name, OffsetDateTime timeStamp, Duration duration, String runLocation, boolean success)

Send information about availability of an application.

abstract void trackAvailability(String name, OffsetDateTime timeStamp, Duration duration, String runLocation, boolean success, String message, Map<String,String> properties, Map<String,Double> metrics)

Send information about availability of an application.

abstract void trackDependency(String dependencyTypeName, String target, String dependencyName, String data, OffsetDateTime startTime, Duration duration, String resultCode, boolean success)

Send information about an external dependency (outgoing call) in the application.

abstract void trackDialogView(String dialogName, Map<String,String> properties, Map<String,Double> metrics)

Log a DialogView using the TrackPageView method on the IBotTelemetryClient if IBotPageViewTelemetryClient has been implemented.

default void trackEvent(String eventName)

Logs custom events with extensible named fields.

default void trackEvent(String eventName, Map<String,String> properties)

Logs custom events with extensible named fields.

abstract void trackEvent(String eventName, Map<String,String> properties, Map<String,Double> metrics)

Logs custom events with extensible named fields.

default void trackException(Exception exception)

Logs a system exception.

abstract void trackException(Exception exception, Map<String,String> properties, Map<String,Double> metrics)

Logs a system exception.

abstract void trackTrace(String message, Severity severityLevel, Map<String,String> properties)

Send a trace message.

Method Details

flush

public abstract void flush()

Flushes the in-memory buffer and any metrics being pre-aggregated.

trackAvailability

public default void trackAvailability(String name, OffsetDateTime timeStamp, Duration duration, String runLocation, boolean success)

Send information about availability of an application.

Parameters:

name - Availability test name.
timeStamp - The time when the availability was captured.
duration - The time taken for the availability test to run.
runLocation - Name of the location the availability test was run from.
success - True if the availability test ran successfully.

trackAvailability

public abstract void trackAvailability(String name, OffsetDateTime timeStamp, Duration duration, String runLocation, boolean success, String message, Map properties, Map metrics)

Send information about availability of an application.

Parameters:

name - Availability test name.
timeStamp - The time when the availability was captured.
duration - The time taken for the availability test to run.
runLocation - Name of the location the availability test was run from.
success - True if the availability test ran successfully.
message - Error message on availability test run failure.
properties - Named string values you can use to classify and search for this availability telemetry.
metrics - Additional values associated with this availability telemetry.

trackDependency

public abstract void trackDependency(String dependencyTypeName, String target, String dependencyName, String data, OffsetDateTime startTime, Duration duration, String resultCode, boolean success)

Send information about an external dependency (outgoing call) in the application.

Parameters:

dependencyTypeName - Name of the command initiated with this dependency call. Low cardinality value. Examples are SQL, Azure table, and HTTP.
target - External dependency target.
dependencyName - Name of the command initiated with this dependency call. Low cardinality value. Examples are stored procedure name and URL path template.
data - Command initiated by this dependency call. Examples are SQL statement and HTTP URL's with all query parameters.
startTime - The time when the dependency was called.
duration - The time taken by the external dependency to handle the call.
resultCode - Result code of dependency call execution.
success - True if the dependency call was handled successfully.

trackDialogView

public abstract void trackDialogView(String dialogName, Map properties, Map metrics)

Log a DialogView using the TrackPageView method on the IBotTelemetryClient if IBotPageViewTelemetryClient has been implemented. Alternatively log the information out via TrackTrace.

Parameters:

dialogName - The name of the dialog to log the entry / start for.
properties - Named string values you can use to search and classify events.
metrics - Measurements associated with this event.

trackEvent

public default void trackEvent(String eventName)

Logs custom events with extensible named fields.

Parameters:

eventName - A name for the event.

trackEvent

public default void trackEvent(String eventName, Map properties)

Logs custom events with extensible named fields.

Parameters:

eventName - A name for the event.
properties - Named string values you can use to search and classify events.

trackEvent

public abstract void trackEvent(String eventName, Map properties, Map metrics)

Logs custom events with extensible named fields.

Parameters:

eventName - A name for the event.
properties - Named string values you can use to search and classify events.
metrics - Measurements associated with this event.

trackException

public default void trackException(Exception exception)

Logs a system exception.

Parameters:

exception - The exception to log.

trackException

public abstract void trackException(Exception exception, Map properties, Map metrics)

Logs a system exception.

Parameters:

exception - The exception to log.
properties - Named string values you can use to classify and search for this exception.
metrics - Additional values associated with this exception.

trackTrace

public abstract void trackTrace(String message, Severity severityLevel, Map properties)

Send a trace message.

Parameters:

message - Message to display.
severityLevel - Trace severity level.
properties - Named string values you can use to search and classify events.

Applies to