PHPackages                             phuocdaivl/app-insights - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. phuocdaivl/app-insights

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

phuocdaivl/app-insights
=======================

Extends the Application Insights API surface to support

1.0.3(6y ago)0127MITPHP

Since Dec 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/phuocdaivl/app-insights)[ Packagist](https://packagist.org/packages/phuocdaivl/app-insights)[ RSS](/packages/phuocdaivl-app-insights/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

DaiDP Application Insights
==========================

[](#daidp-application-insights)

Application Insight for Larvel

[![Latest Version on Packagist](https://camo.githubusercontent.com/7f0e820568b6f979b251e63e775b85ef5090b13cc57f54d49aed3a7d43966721/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068756f63646169766c2f6170702d696e7369676874733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuocdaivl/app-insights)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/600ec76b4e37548c01a159ea801a089295afffead7d419f42b75c27805529f2b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068756f63646169766c2f6170702d696e7369676874732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phuocdaivl/app-insights)[![Total Downloads](https://camo.githubusercontent.com/6dfa32846389aedb29f5354d71fc2e263c5a41091f4e8722f2d190586f3f18a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068756f63646169766c2f6170702d696e7369676874732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuocdaivl/app-insights)

This library uses the [official Application Insights PHP API](https://packagist.org/packages/microsoft/application-insights). To get started, you should have a basic knowledge of how Application Insights works (Tracking Event, Tracking Error, Tracking PageView, Tracking Request, ...).

Download &amp; Install
----------------------

[](#download--install)

```
composer require phuocdaivl/app-insights
```

Add service provider
--------------------

[](#add-service-provider)

Add the service provider to the providers array in the `config/app.php` config file as follows:

```
'providers' => [

    ...

    DaiDP\AppInsights\Providers\AzureAppInsightsProvider::class,
]
```

Well done.

### Handle Error

[](#handle-error)

Open file `app/Exceptions/Handler.php` and add following code:

```
public function render($request, Exception $exception)
{
    $telemetry = app()->get(\DaiDP\AppInsights\TelemetryClient::class);
    $telemetry->trackException($exception);
    $telemetry->flush();

    ...
}
```

### Log customize error

[](#log-customize-error)

- Add log from try catch

```
try {
  // To do something
  ...
} catch(\Exception $ex) {
    $telemetry = app()->get(\DaiDP\AppInsights\TelemetryClient::class);
    $telemetry->trackException($ex);
    $telemetry->flush();
}
```

- Add any customize log

```
$ex = new Exception('Some message');

$telemetry = app()->get(\DaiDP\AppInsights\TelemetryClient::class);
$telemetry->trackException($ex);
$telemetry->flush();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bafc7180e5bde3b20ffea5898803405253992037e40089539b57e11833fda711?d=identicon)[phuocdaivl](/maintainers/phuocdaivl)

---

Top Contributors

[![phuocdaivl](https://avatars.githubusercontent.com/u/38450145?v=4)](https://github.com/phuocdaivl "phuocdaivl (6 commits)")

### Embed Badge

![Health badge](/badges/phuocdaivl-app-insights/health.svg)

```
[![Health](https://phpackages.com/badges/phuocdaivl-app-insights/health.svg)](https://phpackages.com/packages/phuocdaivl-app-insights)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
