This release also includes all the changes from AppSignal for Ruby version 4.10.4 and below.
Added
-
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_VERSIONandCONTAINER_VERSION. Applications deployed on those platforms now report their revision without setting therevisionconfiguration option.This affects collector mode, where deploys were reported as
unknownwhen 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
hostnameconfiguration option to report a different name.This affects collector mode, where all data was reported for a host named
unknownwhen 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.portandnetwork.protocol.versionOpenTelemetry attributes. The host is read from theForwardedandX-Forwarded-Hostheaders 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_headersconfiguration option is an allowlist of Rack environment names, and some of those names are not request headers. Those values are now reported asappsignal.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_headersandkeep_request_environmentconfiguration options, which are used in collector mode. They replacerequest_headers, which is deprecated in collector mode.keep_request_headerslists the request headers to report, using the names OpenTelemetry uses for them, such asacceptandcontent-length.keep_request_environmentlists the Rack environment values to report that are not request headers, using the names Rack uses for them, such asREMOTE_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 setrequest_headerskeeps reporting the same values when it moves to collector mode.The
request_headersconfiguration option is deprecated in collector mode, and a warning will be emitted at startup, containing the values ofkeep_request_headersandkeep_request_environmentthat should be used to replace it.In agent mode,
request_headersstill lists every Rack environment key to report, and the two new options have no effect. -
Add the
Appsignal.add_request_headersandAppsignal.add_request_environmenthelpers.Use
add_request_headersto report request headers, naming each header in lowercase and with dashes, such ascontent-length. Useadd_request_environmentto report the values a Rack environment holds that are not request headers, naming each one the way Rack names it, such asREMOTE_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.
Changed
-
Report
appinstead ofunknownas the OpenTelemetry service name when theservice_nameconfiguration option is not set and collector mode is in use. -
The
filter_parametersandsend_paramsconfiguration options are deprecated in collector mode. Usefilter_request_payload,filter_function_parametersandfilter_request_query_parametersto filter different kinds of parameters, andsend_request_payload,send_request_query_parametersandsend_function_parametersto choose which kinds of parameters to report.In collector mode, each kind of parameter is now filtered and reported according to its own options, and the deprecated options' values are only used to fill in values when the new options are unset. AppSignal logs which values to set to keep reporting what it reports now.
In agent mode,
filter_parametersandsend_paramsstill apply to every kind of parameter, and the new options have no effect.
Fixed
- The
ignore_logsoption now filters out the log lines that match its patterns in collector mode. - In collector mode, backtrace lines from your own application are now shown as paths relative to your application's root, and are recognized as your application's code.
- The
ca_file_pathandhttp_proxyoptions now apply to the data sent to the collector in collector mode. Before this change they only applied to the data sent by the agent, so a custom certificate authority file or a proxy had no effect in collector mode. - Remove an incorrect warning about the
filter_metadataconfiguration option being ignored in collector mode. - Report request headers in collector mode.
- Report no response headers in collector mode until the
response_headersconfiguration option names some. The option had no effect at all, so every response header captured by the application's own OpenTelemetry instrumentation was reported whatever the option said. - Read an array configuration option written as a null in
config/appsignal.ymlas the empty list it means. Options such asfilter_parametersandignore_actionsraised aNoMethodErrorwhen AppSignal started, andfilter_metadataandfilter_session_dataraised one while a transaction was sampled.
Changed
- Update appsignal dependency to 5.0.0.rc.2.
View the Ruby gem v5.0.0.rc.2 changelog for more information.