Class: ApplicationInsights::Channel::TelemetryContext
- Inherits:
-
Object
- Object
- ApplicationInsights::Channel::TelemetryContext
- Defined in:
- lib/application_insights/channel/telemetry_context.rb
Overview
Represents the context for sending telemetry to the Application Insights service.
Instance Attribute Summary collapse
-
#application ⇒ Contracts::Application
The application context.
-
#device ⇒ Contracts::Device
The device context.
-
#instrumentation_key ⇒ String
The instrumentation key that is used to identify which Application Insights application this data is for.
-
#location ⇒ Contracts::Location
The location context.
-
#operation ⇒ Contracts::Operation
The operation context.
-
#properties ⇒ Hash<String, String>
The property context.
-
#session ⇒ Contracts::Session
The session context.
-
#user ⇒ Contracts::User
The user context.
Instance Method Summary collapse
-
#initialize ⇒ TelemetryContext
constructor
Initializes a new instance of the class.
Constructor Details
#initialize ⇒ TelemetryContext
Initializes a new instance of the class.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 24 def initialize @instrumentation_key = nil @application = Contracts::Application.new @device = Contracts::Device.new @user = Contracts::User.new @session = Contracts::Session.new @operation = Contracts::Operation.new @location = Contracts::Location.new @properties = {} end |
Instance Attribute Details
#application ⇒ Contracts::Application
The application context. This contains properties of the application you are running.
41 42 43 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 41 def application @application end |
#device ⇒ Contracts::Device
The device context. This contains properties of the device you are running on.
45 46 47 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 45 def device @device end |
#instrumentation_key ⇒ String
The instrumentation key that is used to identify which Application Insights application this data is for.
37 38 39 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 37 def instrumentation_key @instrumentation_key end |
#location ⇒ Contracts::Location
The location context. This contains properties of the location you are generating telemetry from.
61 62 63 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 61 def location @location end |
#operation ⇒ Contracts::Operation
The operation context. This contains properties of the operation you are generating telemetry for.
57 58 59 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 57 def operation @operation end |
#properties ⇒ Hash<String, String>
The property context. This contains free-form properties that you can add to your telemetry.
65 66 67 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 65 def properties @properties end |
#session ⇒ Contracts::Session
The session context. This contains properties of the session you are generating telemetry for.
53 54 55 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 53 def session @session end |
#user ⇒ Contracts::User
The user context. This contains properties of the user you are generating telemetry for.
49 50 51 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 49 def user @user end |