Class TelemetryContext
java.lang.Object
com.microsoft.applicationinsights.telemetry.TelemetryContext
Represents a context for sending telemetry to the Application Insights service. The context holds
data that is sent with every telemetry item. It includes the instrumentation key; the current
operation id, for correlating related telemetry items; and user, session and device data. You can
also set properties that are added to every telemetry item, and can be used in the portal to
filter the telemetry that used this context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCloud()
Gets the object describing the role and instance in the cloud.Gets the object describing the component (application) tracked by this instance.Gets the object describing the device tracked by this instance.Gets the object describing a location tracked by this instance.Gets the current operation (typically an HTTP request).Gets a dictionary of application-defined property values.Gets the object describing a user session tracked by this instance.getTags()
Gets a dictionary of context tags.getUser()
Gets the object describing a user tracked by this instance.void
setConnectionString
(String connectionString)
-
Constructor Details
-
TelemetryContext
public TelemetryContext()
-
-
Method Details
-
getComponent
Gets the object describing the component (application) tracked by this instance. -
getDevice
Gets the object describing the device tracked by this instance. -
getSession
Gets the object describing a user session tracked by this instance. -
getUser
Gets the object describing a user tracked by this instance. -
getOperation
Gets the current operation (typically an HTTP request). Used to correlate events - for example, exceptions generated while processing a request. -
getLocation
Gets the object describing a location tracked by this instance. -
getCloud
Gets the object describing the role and instance in the cloud. -
getConnectionString
-
setConnectionString
-
getInstrumentationKey
-
getProperties
Gets a dictionary of application-defined property values. -
getTags
Gets a dictionary of context tags.
-