This release also includes all the changes from AppSignal for Ruby version 4.10.4 and below.
-
Detect the revision that is being deployed from the environment variables set by Heroku, Render, Kamal and Scalingo: HEROKU_SLUG_COMMIT, RENDER_GIT_COMMIT, KAMAL_VERSION and CONTAINER_VERSION. Applications deployed on those platforms now report their revision without setting the revision configuration option.
This affects collector mode, where deploys were reported as unknown when the revision was not configured.
-
Detect the hostname of the machine the application runs on. On Heroku this is the name of the dyno, and everywhere else it is the name the host reports for itself. Set the hostname configuration option to report a different name.
This affects collector mode, where all data was reported for a host named unknown when the hostname was not configured.
-
Report the host, the port and the HTTP version of an incoming web request in collector mode. These are sent as the server.address, server.port and network.protocol.version OpenTelemetry attributes. The host is read from the Forwarded and X-Forwarded-Host headers when a proxy sets them, so it is the host the client used rather than the one the proxy connected to.
-
Report the request environment in collector mode. The request_headers configuration option is an allowlist of Rack environment names, and some of those names are not request headers. Those values are now reported as appsignal.environment.* OpenTelemetry attributes and shown in the request's Environment panel, instead of being left out.
Values that describe the request itself are not repeated there, because they are already reported as the request's method, path, host, port and protocol version.
-
Add the keep_request_headers and keep_request_environment configuration options, which are used in collector mode. They replace request_headers, which is deprecated in collector mode.
keep_request_headers lists the request headers to report, using the names OpenTelemetry uses for them, such as accept and content-length. keep_request_environment lists the Rack environment values to report that are not request headers, using the names Rack uses for them, such as REMOTE_ADDR.
Both options default to a value derived from request_headers, which lists Rack environment keys and mixes the two kinds together. So an application that only ever set request_headers keeps reporting the same values when it moves to collector mode.
The request_headers configuration option is deprecated in collector mode, and a warning will be emitted at startup, containing the values of keep_request_headers and keep_request_environment that should be used to replace it.
In agent mode, request_headers still lists every Rack environment key to report, and the two new options have no effect.
-
Add the Appsignal.add_request_headers and Appsignal.add_request_environment helpers.
Use add_request_headers to report request headers, naming each header in lowercase and with dashes, such as content-length. Use add_request_environment to report the values a Rack environment holds that are not request headers, naming each one the way Rack names it, such as REMOTE_ADDR.
In agent mode, both write to the "Environment" sample data, formatted as Rack environment keys. In collector mode, they write different span attributes.
Together they replace Appsignal.add_headers, which is now deprecated, as it accepts Rack environment keys and works out which ones are headers.
-
Report request headers for Webmachine applications.