Class BaseTelemetry

java.lang.Object
com.microsoft.applicationinsights.telemetry.BaseTelemetry
All Implemented Interfaces:
Telemetry
Direct Known Subclasses:
AvailabilityTelemetry, EventTelemetry, ExceptionTelemetry, MetricTelemetry, PageViewTelemetry, RemoteDependencyTelemetry, RequestTelemetry, TraceTelemetry

public abstract class BaseTelemetry extends Object implements Telemetry
Superclass for all telemetry data classes.
  • Constructor Details

    • BaseTelemetry

      protected BaseTelemetry()
  • Method Details

    • initialize

      protected void initialize(ConcurrentMap<String,String> properties)
      Initializes the instance with the context properties
    • getTimestamp

      public Date getTimestamp()
      Gets date and time when event was recorded.
      Specified by:
      getTimestamp in interface Telemetry
    • setTimestamp

      public void setTimestamp(Date timestamp)
      Sets date and time when event was recorded.
      Specified by:
      setTimestamp in interface Telemetry
    • getContext

      public TelemetryContext getContext()
      Gets the context associated with the current telemetry item.
      Specified by:
      getContext in interface Telemetry
    • getProperties

      public Map<String,String> getProperties()
      Gets a dictionary of application-defined property names and values providing additional information about this event.
      Specified by:
      getProperties in interface Telemetry
    • getData

      protected abstract Object getData()