Package 

Class TelemetryClient


  • 
    public class TelemetryClient
    
                        

    The public API for recording application insights telemetry.

    • Method Detail

      • trackEvent

         void trackEvent(String eventName)

        {@code properties} defaults to {@code null}. {@code measurements} defaults to {@code null}.

      • track

         void track(TelemetryData telemetry)

        Sends information about any object that extend TelemetryData interface to Application Insights.For most use-cases, the other tracking methods will be sufficient. Providing this generic methodfor very specific uses.

        Parameters:
        telemetry - an object that extends TelemetryData
      • trackEvent

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

        Sends information about an event to Application Insights.

        Parameters:
        eventName - The name of the event
        properties - Custom properties associated with the event.
        measurements - Custom measurements associated with the event.
      • trackTrace

         void trackTrace(String message)

        {@code measurements} defaults to {@code null}.

      • trackTrace

         void trackTrace(String message, Map<String, String> properties)

        Sends tracing information to Application Insights.

        Parameters:
        message - The message associated with this trace.
        properties - Custom properties associated with the event.
      • trackMetric

         void trackMetric(String name, double value)

        Sends information about an aggregated metric to Application Insights. Note: all data sent viathis method will be aggregated. To log non-aggregated data use trackEvent with measurements.

        Parameters:
        name - The name of the metric
        value - The value of the metric
      • trackMetric

         void trackMetric(String name, double value, Map<String, String> properties)

        Sends information about an aggregated metric to Application Insights. Note: all data sent viathis method will be aggregated. To log non-aggregated data use trackEvent with measurements.

        Parameters:
        name - The name of the metric
        value - The value of the metric
      • trackPageView

         void trackPageView(String pageName)

        {@code properties} defaults to {@code null}. {@code measurements} defaults to {@code null}.

      • trackNewSession

         void trackNewSession()

        Sends information about a new Session to Application Insights.