nipwaayoni/elastic-apm-php-agent
Laravel-friendly Elastic APM PHP agent for instrumenting apps and sending performance data, errors, and transactions to an Elastic APM Server. Helps monitor response times, slow queries, and exceptions with simple setup and configurable reporting.
Adds shared context to Matadata objects in order to provider more complete contextual data across events.
Thanks to @davidmanassa for starting this.
Addresses deprecation warnings when running under PHP 8.4.
Thanks to @janlanger for the contribution.
This release adds support for using API Keys for authentication to the Elastic server. See the APM docs for details. Thanks to @fmiqbal for the suggestion and help testing.
The connector now also uses Psr18FactoryDiscovery::find() if a client is not provided. Minimum minor versions of dependencies have been updated as well as suggesting guzzle7-adapter rather than guzzle6-adapter.
Of note is that the internal Agent version number had not been updated for new releases since 7.3.0. That version was incremented for this release and I'll try to catch that for future releases as well.
This release treats the TimeStamp as a true integer value. The APM data schema specifies the timestamp must be an integer. Previous versions of this package treated the value as a rounded float in an attempt to work with 32bit PHP installations. That has proven to be problematic. With the move to representing the timestamp as an integer, this package now requires 64bit PHP, and the composer constraint has been updated accordingly. Thanks to @cmtickle and @colin-redbox for the assist.
This release also updates the workflow to use a newer version of php-cs-fixer and include PHP 8.2 in the test matrix.
This release addresses deprecation warnings in PHP 8.1 related to passing empty values to strlen
Adds the APM 8 schema for validation. The only functional change is the inclusion of the transaction object within corresponding error objects.
Update method signatures from psr/log package to match 3.x expectations.
Thanks to @syehan.
Per #75 , final had been applied to a private method. This is pointless and no longer allowed under PHP 8.
Thanks to @janlanger.
Makes the transaction sampling indicator a fixed value per transaction.
Fixes:
This release adds helpers to the TraceableEvent class for constructing the traceparent header for the event.
The stack trace limit default has been changed from 0 (unlimited) to 50 to be consistent with other agents.
Major feature changes
Deprecations
tags are being replaced with labels per the Elastic APM preferenceConfig::get() method is deprecated in favor of named accessorsBreaking changes
Agent::send() and Connector::commit() no longer return a boolean and will instead throw exceptions when appropriateSpan objects now default to blocking and a new AsyncSpan class is available for non-blocking eventsThe previous method of registering a custom class with the AgentBuilder has been removed in favor of simply extending the AgentBuilder and overriding the addAgent() method.
Changes have been made to ease the extension of the Agent class and support alternate implementations in the AgentBuilder.
Breaking changes:
Agent::send() method no longer returns a bool. The method now has a void return type and will rely on exceptions to communicate failure.Thanks @tsantos84
Add documentation describing the pre/post commit hook callbacks.
Improve operation under 32-bit systems which cannot represent microsecond time as an integer. Add AgentBuilder::create() to ease creation of Agent objects. Add pre/post commit hooks for Connector.
This release provides support for APM v2 intake. There are a number of internal changes as well, some of which create breaking changes that may require action if you used previous versions. Please review the breaking changes list.
How can I help you explore Laravel packages today?