Breaking Changes
September 27, 2020 ยท View on GitHub
7.5
- The
Agent::send()method no longer returns abool. The method now has avoidreturn type and will rely on exceptions to communicate failure. - The
Connector::commit()method no longer returns abool. The method now has avoidreturn type and will rely on exceptions to communicate failure. Spanobjects now default to "sync: true" indicating they are blocking. The APM schema definessyncas "Indicates whether the span was executed synchronously or asynchronously." Since most PHP execution is synchronous, this default makes sense. A newAsyncSpanclass has been added to represent asynchronously executed spans.- The
EventFactoryInterfacenow includes anewAsyncSpanmethod which must be implemented.
Deprecated
- The
AgentBuilder::withTagData()method is deprecated in favor ofAgentBuilder::withLabelData(), in keeping with Elastic and other agents. - The configuration options
active,appName,appVersionandbacktraceLimitare all deprecated in favor of more commonly used names. See the configuration legacy options for details and alternatives. - The
Config::get()method is deprecated in favor of named accessors. Furthermore, the behavior of theConfigclass to carry arbitrary key/value pairs is also deprecated. A future release will only allow known configuration keys.
6.x to 7.x
- The
EventFactoryInterfacehas been changed, in case you are injecting your custom Event Factory, you will be affected. - The methods
Transaction::setSpans,Transaction::getSpans,Transaction::getErrorsandTransaction::setErrorshas been removed given the schema change rendered the these method unnecessary. - The explicit use of the GuzzleHttp client has been replaced with the php-http. This decreases the potential dependency conflicts but does place a burden on the consumer. See the install document for details.
- The first argument to the
Agentconstructor must now be aConfigobject rather than an array of configuration values. - The second argument to the
Agentconstructor must now be aContextCollectionobject rather than an array of context values. - The
Agentconstructor parameters have changed and are now required. Direct creation of anAgentis discouraged in favor of using theAgentBuilderclass. - The
Configclass no longer acceptshttpClient,envorcookieskeys and will cause anUnsupportedConfigurationValueExceptionif given. - Specifying environment variable and HTTP cookie names to include in APM events must now be done through a
ContextCollectionobject or through theAgentBuilderclass. Transactionclass constructors no longer accept a start time. You must now pass the start time to theTransaction::start()method consistent withSpanobjects.- The
EventFactoryInterface::newTransactionmethod signature has changed to remove the$startargument.