Added 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 the W3C trace header format and the 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 by setting
true, the Ruby agent will now accept W3C's
tracestateheaders when calling
DistributedTracing.accept_distributed_trace_headersor automatically via
httpinstrumentation. When calling
DistributedTracing.insert_distributed_trace_headers, or automatically via
httpinstrumentation, the Ruby agent will include the W3C headers along with the New Relic distributed tracing header, unless the New Relic trace header format is disabled by setting
DistributedTracing.accept_distributed_trace_headersAPI for accepting both New Relic and W3C TraceContext distributed traces.
DistributedTracing.accept_distributed_trace_payloadwhich will be removed in a future major release.
DistributedTracing.insert_distributed_trace_headersAPI for adding outbound distributed trace headers. Both W3C TraceContext and New Relic formats will be included unless
DistributedTracing.create_distributed_trace_payloadwhich will be removed in a future major release.
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 Ruby New Relic agents to this agent release.
Official Ruby 2.7 support
The Ruby agent has been verified to run with Ruby 2.7.0.
Reduced allocations when tracing transactions using API calls
Default empty hashes for
optionsparameter were not frozen, leading to excessive and unnecessary allocations when calling APIs for tracing transactions.
Thanks to Joel Turkel (jturkel) for the contribution!
Bugfix for Resque worker thread race conditions
Recent changes in Rack surfaced issues marshalling data for Resque, surfaced a potential race-condition with closing out the worker-threads before flushing the data pipe. This is now fixed.
Thanks to Bertrand Paquet (bpaquet) for the contribution!
Bugfix for Content-Length when injecting browser monitoring JS
The Content-Length HTTP header would be incorrect after injecting the browser monitoring JS into the HEAD tag of the HTML source with Content-Length and lead to the HTML BODY content being truncated in some cases. The Content-Length is now correctly updated after injecting the browser monitoring JS script.
Thanks to Slava Kardakov (ojab) for the contribution!
Ruby agent v6.9.0
February 20, 2020Download