Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

ApplicationInsights Telemetry_Context

Jakub Oleksy edited this page Dec 20, 2014 · 1 revision

ApplicationInsights\Telemetry_Context

Responsible for managing the context to send along with all telemetry items.

  • Class name: Telemetry_Context
  • Namespace: ApplicationInsights

Properties

$_instrumentationKey

private string $_instrumentationKey

The instrumentation key

  • Visibility: private

$_deviceContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\Device $_deviceContext

The device context

  • Visibility: private

$_applicationContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\Application $_applicationContext

The application context

  • Visibility: private

$_userContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\User $_userContext

The user context

  • Visibility: private

$_locationContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\Location $_locationContext

The location context

  • Visibility: private

$_operationContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\Operation $_operationContext

The operation context

  • Visibility: private

$_sessionContext

private \ApplicationInsights\ApplicationInsights\Channel\Contracts\Session $_sessionContext

The session context

  • Visibility: private

$_properties

private array $_properties

Additional custom properties array.

  • Visibility: private

Methods

\ApplicationInsights\Telemetry_Context::__construct()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::__construct()()

Initializes a new TelemetryContext.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::getInstrumentationKey()

string ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getInstrumentationKey()()

The instrumentation key for your Application Insights application.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setInstrumentationKey()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setInstrumentationKey()(string $instrumentationKey)

Sets the instrumetation key on the context. This is the key for you application in Application Insights.

  • Visibility: public

Arguments

  • $instrumentationKey string - <p>(Guid)</p>

\ApplicationInsights\Telemetry_Context::getDeviceContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\Device ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getDeviceContext()()

The device context object. Allows you to set properties that will be attached to all telemetry about the device.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setDeviceContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setDeviceContext()(\ApplicationInsights\ApplicationInsights\ApplicationInsights\Channel\Contracts\Device $deviceContext)

Sets device context object. Allows you to set properties that will be attached to all telemetry about the device.

  • Visibility: public

Arguments

  • $deviceContext ApplicationInsights\ApplicationInsights\ApplicationInsights\Channel\Contracts\Device

\ApplicationInsights\Telemetry_Context::getApplicationContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\Application ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getApplicationContext()()

The application context object. Allows you to set properties that will be attached to all telemetry about the application.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setApplicationContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setApplicationContext()(\ApplicationInsights\ApplicationInsights\Channel\Contracts\Application $applicationContext)

Sets application context object. Allows you to set properties that will be attached to all telemetry about the application.

  • Visibility: public

Arguments

  • $applicationContext ApplicationInsights\ApplicationInsights\Channel\Contracts\Application

\ApplicationInsights\Telemetry_Context::getUserContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\User ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getUserContext()()

The user context object. Allows you to set properties that will be attached to all telemetry about the user.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setUserContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setUserContext()(\ApplicationInsights\ApplicationInsights\Channel\Contracts\User $userContext)

Set user context object. Allows you to set properties that will be attached to all telemetry about the user.

  • Visibility: public

Arguments

  • $userContext ApplicationInsights\ApplicationInsights\Channel\Contracts\User

\ApplicationInsights\Telemetry_Context::getLocationContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\Location ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getLocationContext()()

The location context object. Allows you to set properties that will be attached to all telemetry about the location.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setLocationContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setLocationContext()(\ApplicationInsights\ApplicationInsights\Channel\Contracts\Location $locationContext)

Set location context object. Allows you to set properties that will be attached to all telemetry about the location.

  • Visibility: public

Arguments

  • $locationContext ApplicationInsights\ApplicationInsights\Channel\Contracts\Location

\ApplicationInsights\Telemetry_Context::getOperationContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\Location ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getOperationContext()()

The operation context object. Allows you to set properties that will be attached to all telemetry about the operation.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setOperationContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setOperationContext()(\ApplicationInsights\ApplicationInsights\Channel\Contracts\Operation $operationContext)

Set operation context object. Allows you to set properties that will be attached to all telemetry about the operation.

  • Visibility: public

Arguments

  • $operationContext ApplicationInsights\ApplicationInsights\Channel\Contracts\Operation

\ApplicationInsights\Telemetry_Context::getSessionContext()

\ApplicationInsights\ApplicationInsights\Channel\Contracts\Session ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getSessionContext()()

The session context object. Allows you to set properties that will be attached to all telemetry about the session.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setSessionContext()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setSessionContext()(\ApplicationInsights\ApplicationInsights\Channel\Contracts\Session $sessionContext)

Set session context object. Allows you to set properties that will be attached to all telemetry about the session.

  • Visibility: public

Arguments

  • $sessionContext ApplicationInsights\ApplicationInsights\Channel\Contracts\Session

\ApplicationInsights\Telemetry_Context::getProperties()

array ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::getProperties()()

Get the additional custom properties array.

  • Visibility: public

\ApplicationInsights\Telemetry_Context::setProperties()

mixed ApplicationInsights\Telemetry_Context::\ApplicationInsights\Telemetry_Context::setProperties()(array $properties)

Set the additional custom properties array.

  • Visibility: public

Arguments

  • $properties array - <p>Additional properties (name/value pairs) to append as custom properties to all telemetry.</p>
Clone this wiki locally