You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
[](https://packagist.org/packages/microsoft/application-insights)
5
5
6
+
This project extends the Application Insights API surface to support PHP.
7
+
[Application
8
+
Insights](http://azure.microsoft.com/services/application-insights/) is a
9
+
service that allows developers to keep their application available, performing
10
+
and succeeding. This PHP module will allow you to send telemetry of various
11
+
kinds (event, trace, exception, etc.) to the Application Insights service where
12
+
they can be visualized in the Azure Portal.
6
13
7
-
This project extends the Application Insights API surface to support PHP. [Application Insights](http://azure.microsoft.com/en-us/services/application-insights/) is a service that allows developers to keep their application available, performing and succeeding. This PHP module will allow you to send telemetry of various kinds (event, trace, exception, etc.) to the Application Insights service where they can be visualized in the Azure Portal.
8
-
9
-
## Requirements ##
14
+
## Requirements
10
15
11
16
PHP version >=5.4.2 is supported.
12
17
13
18
For opening the project in Microsoft Visual Studio you will need [PHP Tools for Visual Studio](http://www.devsense.com/products/php-tools). This is not required however.
14
19
15
-
## Installation ##
20
+
## Installation
16
21
17
22
We've published a package you can find on [Packagist](https://packagist.org/packages/microsoft/application-insights). In order to use it, first, you'll need to get [Composer](https://getcomposer.org/).
18
23
@@ -28,14 +33,15 @@ Make sure you add the require statement to pull in the library:
28
33
require_once 'vendor/autoload.php';
29
34
```
30
35
31
-
## Usage ##
36
+
## Usage
32
37
33
38
Once installed, you can send telemetry to Application Insights. Here are a few samples.
34
39
35
40
>**Note**: before you can send data to you will need an instrumentation key. Please see the [Getting an Application Insights Instrumentation Key](https://github.com/Microsoft/AppInsights-Home/wiki#getting-an-application-insights-instrumentation-key) section for more information.
36
41
42
+
**Initializing the client and setting the instrumentation key and other optional
43
+
configurations**
37
44
38
-
**Initializing the client and setting the instrumentation key and other optional configurations**
39
45
```php
40
46
$telemetryClient = new \ApplicationInsights\Telemetry_Client();
41
47
$context = $telemetryClient->getContext();
@@ -56,74 +62,92 @@ $telemetryClient->flush();
56
62
57
63
**Setup Operation context**
58
64
59
-
For correct Application Insights reporting you need to setup Operation Context, reference to Request
65
+
For correct Application Insights reporting you need to setup Operation Context,
0 commit comments