Added
-
Add the
set_request_payload,set_request_query_parametersandset_function_parametershelpers. Each one reports a kind of parameters that collector mode keeps apart, so the option that filters that kind, and the one that suppresses it, apply to what you report:Pythonfrom appsignal import set_function_parameters set_function_parameters({"user_id": 123})In collector mode, the
set_paramshelper is now deprecated, and it reports the request payload. It does not say which kind of parameters it is given, so useset_request_payload,set_request_query_parametersorset_function_parametersinstead. AppSignal warns the first time it is used.In agent mode there is one place to report parameters, so all four helpers report to it, the last one called is the one that takes effect, and
set_paramsis not deprecated. -
Report the response headers listed in the
response_headersconfiguration option when a collector is used.
Changed
-
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.AppSignal warns about the deprecated options at startup, and names the value to set for each option that replaces them.
In agent mode,
filter_parametersandsend_paramsstill apply to every kind of parameter, and the new options have no effect. -
In collector mode, the
filter_request_payload,filter_function_parametersandfilter_request_query_parametersconfiguration options now fall back to the value offilter_parameters, and thesend_request_payload,send_request_query_parametersandsend_function_parametersoptions fall back to the value ofsend_params. An application that filtered parameters or turned parameter reporting off keeps doing so after it switches to a collector, without having to set the new options.Setting one of the new options still overrides the value that would be derived for it.
-
The
appsignal diagnosereport now names where each configuration option's value came from. An option set from more than one source lists the value from each source. -
In collector mode, the Django and Flask instrumentation now reports a request's query string as query parameters rather than as a request payload. So
filter_request_query_parametersandsend_request_query_parametersapply to a query string, andfilter_request_payloadandsend_request_payloadapply to a Django request's body.In agent mode, a Flask application's query parameters are now reported on their own, rather than nested under an
argskey.
Fixed
-
Report a request or response header whose name is written with capital letters or underscores in the
request_headersorresponse_headersconfiguration option, such asContent-Typeorcontent_type. The collector matches these names against the ones it receives the headers under, which follow the OpenTelemetry semantic convention: the header's own name, lowercased, with its dashes kept. A name written any other way matched nothing, so the header was left out.The
set_headerhelper names a header the same way when a collector is in use.
View the Python package v1.8.0 changelog for more information.