New Features
With the addition of attributes on spans, the PHP agent now fully supports Infinite Tracing on New Relic Edge.
Infinite Tracing observes 100% of your distributed traces and provides visualizations for the most actionable data so you have the examples of errors and long-running traces so you can better diagnose and troubleshoot your systems. You configure your agent to send traces to a trace observer in New Relic Edge. You view your distributed traces through the New Relic’s UI. There is no need to install a collector on your network.
Infinite Tracing is currently available on a sign-up basis. If you would like to participate, please contact your sales representative.
Added support for attributes on spans. All custom attributes and some agent attributes previously applied as “Transaction events” are now also applied to the currently executing span, subject to the new span configuration settings.
Added the
transaction.name
to spans.Added
http.statusCode
to external spans, representing the status code on an http response.Added error attributes to each span that exits with an error or exception.
error.class
anderror.message
are now included on the span in which an error or exception was noticed, and, in the case of unhandled exceptions, on any ancestor spans that also exit with an error. Also, the public API methodnewrelic_notice_error
now attaches these error attributes to the currently executing span, while still creating a Transaction Error event.Spans with error details are now highlighted red in the distributed tracing UI, and error details will expose the associated
error.class
anderror.message
. It is also now possible to see when an exception leaves the boundary of the span, and if it is caught in an ancestor span without reaching the entry span. NOTE: This “bubbling up” of exceptions will impact the error count when compared to prior behavior for the same trace. It is possible now to have a trace that has span errors without showing an error on the root span or entry spans.Added a new API method
newrelic_add_custom_span_parameter
that allows adding custom attributes to spans. This is independent of the transaction; using this new API to add custom attributes to spans does not add them to transactions. If the maximum number of custom attributes is reached, span-level custom attributes take precedence over transaction-level custom attributes.Added the following span event attributes configuration to enable attribute filtering for spans:
newrelic.span_events.attributes.enabled
newrelic.span_events.attributes.include
newrelic.span_events.attributes.exclude
Note: Security recommendation—Review your Transaction attributes configuration. Any attribute include or exclude settings specific to Transaction events, should be applied to your Span attributes configuration or your global attributes configuration.
Bug Fixes
- In cases where the agent is configured to connect to the hostname of a daemon that exists in a separate container/host, after successfully connecting, the agent would not attempt to resolve the IP address again. This was seen when the daemon container/host goes down and then comes up again with a new IP address. Now, the agent will wait 45 seconds since either the last known good connection or the last IP address resolution and will attempt to resolve an IP address again.
New Features
- Added support for New Relic Infinite Tracing. Note: the PHP agent does not yet support attributes on spans. This will be available in the next minor release.
- Added the following Infinite Tracing configuration options:
- Support for auto-instrumenting Symfony 5 applications has been added.
- Support for auto-instrumenting Drupal 9 applications has been added.
Bug Fixes
- In some cases the
newrelic-daemon
got caught in an infinite loop on startup when the socket it tried to connect to was already acquired by another process. This behavior has been accounted for and fixed.
Bug Fixes
- In some cases, instrumenting Laravel queue applications while having distributed tracing turned on could potentially lead to a segfault. This has been fixed.
Bug Fixes
- In some rare cases where requests to cloud provider metadata endpoints are blocked via certain methods, the PHP Daemon logged panics from the underlying Go HTTP library. This scenario is now accounted for and handled gracefully.
Upgrade notices
- On Linux systems, the default value for
newrelic.daemon.address
changed from/tmp/.newrelic.sock
to@newrelic
. This means that by default on Linux, agent and daemon communicate via abstract sockets instead of socket files. - The PHP Agent installer for Ubuntu/Debian systems now requires
Python 3
. Debian based distributions withPython 2
are no longer supported.
End of life notices
The distributing tracing API functions
newrelic_create_distributed_trace_payload()
newrelic_accept_distributed_trace_payload()
, andnewrelic_accept_distributed_trace_payload_httpsafe()
used to manually instrument applications have been deprecated, and will be removed in a future release.Instead, use the API functions compatible with W3C Trace Context support, added in agent version 9.8:
newrelic_insert_distributed_trace_headers()
, andnewrelic_accept_distributed_trace_headers()
Bug fixes
Under some circumstances, Drupal 8 transactions were named after generic controllers. These names were not useful for troubleshooting.
Drupal 8 transaction naming is now improved and hooks into Symfony routing to resolve the main controller associated with a route.
New Features
Support for W3C Trace Context, with easy upgrade from New Relic trace context
- Distributed Tracing now supports W3C Trace Context headers for HTTP protocols when distributed tracing is enabled. Our implementation can accept and emit both W3C trace header format and New Relic trace header format. This simplifies agent upgrades, allowing trace context to be propagated between services with older and newer releases of New Relic agents. W3C trace header format will always be accepted and emitted. New Relic trace header format will be accepted, and you can optionally disable emission of the New Relic trace header format.
- When distributed tracing is enabled, there are two new API function calls available that now support W3C
tracestate
andtraceparent
distributed tracing headers in addition to the New Relic distributed tracing header information:newrelic_insert_distributed_trace_headers()
is used to add distributed tracing headersnewrelic_accept_distributed_trace_headers()
is used to accept distributed tracing headers
- When distributed tracing is enabled, you can use the new configuration setting
newrelic.distributed_tracing_exclude_newrelic_header
to exclude the New Relic distributing tracing header and only rely on W3C Trace Context headers.
Bug fixes
- Fixed a case where the memory usage of the PHP agent increases when
newrelic.transaction_tracer.max_segments_cli
limit is reached. - In rare cases, optimized segment data structures could cause crashes for long-running transactions that hit the segment limit set via
newrelic.transaction_tracer.max_segments_cli
ornewrelic.transaction_tracer.max_segments_web
. This has been fixed.
Known Issues and Workarounds
- If a .NET agent is initiating distributed traces as the root service, you must update that .NET agent to version
8.24
or later before upgrading your downstream PHP New Relic agents to this agent release.
New Features
Avoid potential memory exhaustion for long running transactions
The configuration settings
newrelic.transaction_tracer.max_segments_cli
andnewrelic.transaction_tracer.max_segments_web
were added. These settings can be used to limit the number of segments the PHP agent records during a CLI transaction and a web transaction respectively.newrelic.transaction_tracer.max_segments_cli
defaults to100000
and thus avoids potential memory exhaustion for long running CLI transactions.newrelic.transaction_tracer.max_segments_web
defaults to0
, meaning that the PHP Agent shall capture all segments during a web transaction.For more information, see the documentation about the PHP agent configuration.
Performance improvements
- The PHP agent now creates segments in a more efficient way, which results in improved performance.
Bug fixes
- The Debian init script now uses
pidof
instead ofps
. This solves issues related to starting the daemon with systemctl on Debian. Previously, the daemon would start and immediately stop.
Bug Fixes
- In 9.6.0, custom outbound headers added to curl requests could be silently removed if both
newrelic.cross_application_tracer.enabled
andnewrelic.distributed_tracing_enabled
are disabled. This has been fixed.
New Features
Enhanced visibility into curl_multi_exec calls
- Previously, curl_multi_exec requests appeared as one segment with one total time. Now, we expose the individual segments of a curl_multi_exec request that include individual times and host details. This provides greater visibility as to which URLs are being called and improved ability to troubleshoot slow curl calls.
Configurable daemon start timeout
The PHP Agent has introduced a new configuration
newrelic.daemon.start_timeout
. Customers may use this to specify a timeout for the agent to wait for the daemon after a daemon was launched by the agent.With this timeout set, the agent will not immediately drop a transaction when the launched daemon hasn't acquired a socket yet, but rather grants the daemon time to do so.
It is recommended to only set this timeout when instrumenting long-lived background tasks, as in case of daemon start problems the agent will block for the given timeout at every transaction start.
Upgrade Notice
For cross agent conformance, the agent attribute
httpResponseCode
has been renamed tohttp.statusCode
. In PHP agent release 9.4, we erroneously introducedhttpResponseCode
as the replacement forresponse.statusCode
.The new
http.statusCode
agent attribute name will align with other agents and enables standardized alerts and INSIGHTS queries based on a common attribute name.Attributes are reported with both the new
http.statusCode
name and the
legacyhttpResponseCode
andresponse.statusCode
attribute names.Support for legacy attribute names will be removed in future agent versions.
Known issues and workarounds
Potential memory exhaustion for long running transactions
- See description and recommendations under Known issues and workarounds in the PHP 9.0.0.242 release notes.
New Features
Support for Real Time Streaming
- Event data is now sent to New Relic every five seconds, instead of every minute. As a result, transaction, error, and custom events will now be available in New Relic and Insights dashboards in near real time. For more information on how to view your events with a five-second refresh, see the real time streaming documentation.
- Note that the overall limits on how many events can be sent per minute have not changed. Also, span events, metrics, and trace data is unaffected, and will still be sent every minute.
Laravel 6 is now fully supported by the PHP agent.
Known issues and workarounds
Potential memory exhaustion for long running transactions
- See description and recommendations under Known issues and workarounds in the PHP 9.0.0.242 release notes.