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.
-
#cloud ⇒ Contracts::Cloud
The cloud 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.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 27 def initialize @instrumentation_key = nil @application = Contracts::Application.new @cloud = Contracts::Cloud.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.
47 48 49 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 47 def application @application end |
#cloud ⇒ Contracts::Cloud
The cloud context. This contains properties of the cloud role you are generating telemetry for.
52 53 54 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 52 def cloud @cloud end |
#device ⇒ Contracts::Device
The device context. This contains properties of the device you are running on.
57 58 59 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 57 def device @device end |
#instrumentation_key ⇒ String
The instrumentation key that is used to identify which Application Insights application this data is for.
42 43 44 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 42 def instrumentation_key @instrumentation_key end |
#location ⇒ Contracts::Location
The location context. This contains properties of the location you are generating telemetry from.
77 78 79 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 77 def location @location end |
#operation ⇒ Contracts::Operation
The operation context. This contains properties of the operation you are generating telemetry for.
72 73 74 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 72 def operation @operation end |
#properties ⇒ Hash<String, String>
The property context. This contains free-form properties that you can add to your telemetry.
82 83 84 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 82 def properties @properties end |
#session ⇒ Contracts::Session
The session context. This contains properties of the session you are generating telemetry for.
67 68 69 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 67 def session @session end |
#user ⇒ Contracts::User
The user context. This contains properties of the user you are generating telemetry for.
62 63 64 |
# File 'lib/application_insights/channel/telemetry_context.rb', line 62 def user @user end |