TelemetryContext class
Additional information to be attached to telemetry items produced by a TelemetryClient.
A TelemetryContext is mutable wrapper around a Map<String, dynamic>. Every TelemetryClient has an instance of TelemetryContext that will be attached to each telemetry item produced by it.
Most of the properties on this type, such as device and user, are provided for convenience. They allow you to easily get or set contextual information for commonly-known Application Insights properties without needing to know the property keys. All properties, regardless of whether they're well-known or custom ones, can also be accessed via properties.
See also:
Constructors
- TelemetryContext()
- Creates an instance of TelemetryContext that is initially empty.
Properties
- applicationVersion ↔ String
-
The application version to attach to telemetry items.
getter/setter pair
- cloud → CloudContext
-
Cloud-related properties to attach to telemetry items.
final
- device → DeviceContext
-
Device-related properties to attach to telemetry items.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- location → LocationContext
-
Location-related properties to attach to telemetry items.
final
- operation → OperationContext
-
Operation-related properties to attach to telemetry items.
final
-
properties
→ Map<
String, dynamic> -
All properties attached to this context, including those encapsulated by convenience Dart properties such as
device and user.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → SessionContext
-
Session-related properties to attach to telemetry items.
final
- user → UserContext
-
User-related properties to attach to telemetry items.
final
Methods
-
clone(
) → TelemetryContext - Creates a clone of this context that is completely independent of its source.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited