Download the PHP package app-insights-php/monolog-handler without Composer
On this page you can find all versions of the php package app-insights-php/monolog-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download app-insights-php/monolog-handler
More information about app-insights-php/monolog-handler
Files in app-insights-php/monolog-handler
Package monolog-handler
Short Description Microsoft App Insights monolog handler
License MIT
Informations about the package monolog-handler
Microsoft App Insights monolog handler
It provides to monolog handlers for AppInsights: for tracking dependency (AppInsightsDependencyHandler) and traces (AppInsightsTraceHandler).
Long running processes
It might be tricky to find a proper moment to flush everything to AppInsights for long running processes (e.g: consumers). One of the solution might be a Buffer Handler. You can easily wrap both handlers by Buffer Handler and set up an overflow buffer. They are designed to flush everything into AppInsight's when a buffer overflows.
Limitations
Size of the telemetry is limited to 64 kilobytes. Handlers checks the length of the telemetry before adding it to the AppInsights Client's queue. If it exceeds the limit it won't be added! It means that AppInsights should not be the only source for your data. You should always have a copy somewhere else where you don't have such limitations.
Usage example in Laravel:
-
Update config/logging.php with a new entry:
- Register a new service provider
2.1 Register servicer provider dependencies for the log handler in the boot()
method.
All versions of monolog-handler with dependencies
monolog/monolog Version ^1.1 || ^2.0
app-insights-php/client Version ^0.3