app-insights-php / client
Microsoft App Insights telemetry client php wrapper
Fund package maintenance!
norberttech
Installs: 425 610
Dependents: 4
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 13
Open Issues: 4
Requires
- php: ~8.1 || ~8.2
- app-insights-php/application-insights: ^0.5
- guzzlehttp/guzzle: ^7.4
- psr/log: ^1.1 || ^2.0 || ^3.0
- psr/simple-cache: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- phpunit/phpunit: ^8.5 || ^9.0
This package is auto-updated.
Last update: 2024-02-23 05:51:26 UTC
README
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.
Usage
$client = new AppInsightsPHP\Client\Factory( 'your_instrumentation_key', AppInsightsPHP\Client\Configuration::createDefault() ); $client->trackMessage(...); $client->trackRequest(...); // ... all methods available by source package
Limitations
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.