app-insights-php/client
PHP wrapper for microsoft/application-insights that provides a configurable telemetry client for Microsoft App Insights. Simplifies integration (incl. bundle use) and validates telemetry against the 64KB size limit, throwing exceptions when exceeded.
This class wraps microsoft/application-insights package allowing to configure it according to the current needs.
It was created to simplify app-insights-php/app-insights-php-bundle implementation.
$client = new AppInsightsPHP\Client\Factory(
'your_instrumentation_key',
AppInsightsPHP\Client\Configuration::createDefault()
);
$client->trackMessage(...);
$client->trackRequest(...);
// ... all methods available by source package
Size of the telemetry is limited to 64 kilobytes.
Before trying to send anything to AppInsights a telemetry is validated against that requirement. If it exceeds the limit
exception is thrown. To avoid that exception you should first check if the given data are not too big. You can
use TelemetryData::exceededMaximumSize() do it for you.
How can I help you explore Laravel packages today?