-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't set params when send_params is false #771
Conversation
There was no test to make sure the params are actually set. This patch adds a regression test to make sure this isn't broken through future work.
Currently, the send_params configuration option is checked in appsignal_plug, in Appsignal.Plug.set_params/2-3. Since parameters are now also added from appsignal_phoenix, and because there's already a distinction between sample data and parameters in Appsignal.Span, Appsignal.Span.set_sample_data/3-4 now checks the send_params configuration if the passed key equals "params". The implementation in appsignal_plug can be removed when depending on the upcoming version of this library.
@@ -0,0 +1,6 @@ | |||
--- | |||
bump: "patch" | |||
type: "add" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: "add" | |
type: "fix" |
Is it not a bug fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. This simply moves setting the params from the Plug integration (the only place params are set right now) to the main Elixir one. We’re doing this so we don’t have to implement it for the LiveView params again.
* Add missing test to set parameter values There was no test to make sure the params are actually set. This patch adds a regression test to make sure this isn't broken through future work. * Don't set params when send_params is false Currently, the send_params configuration option is checked in appsignal_plug, in Appsignal.Plug.set_params/2-3. Since parameters are now also added from appsignal_phoenix, and because there's already a distinction between sample data and parameters in Appsignal.Span, Appsignal.Span.set_sample_data/3-4 now checks the send_params configuration if the passed key equals "params". The implementation in appsignal_plug can be removed when depending on the upcoming version of this library.
* Add missing test to set parameter values There was no test to make sure the params are actually set. This patch adds a regression test to make sure this isn't broken through future work. * Don't set params when send_params is false Currently, the send_params configuration option is checked in appsignal_plug, in Appsignal.Plug.set_params/2-3. Since parameters are now also added from appsignal_phoenix, and because there's already a distinction between sample data and parameters in Appsignal.Span, Appsignal.Span.set_sample_data/3-4 now checks the send_params configuration if the passed key equals "params". The implementation in appsignal_plug can be removed when depending on the upcoming version of this library.
✔️ All good! |
Since appsignal 2.2.13 (which includes appsignal/appsignal-elixir#771 and appsignal/appsignal-elixir#772), the app's configuration is checked whenever parameters or session data is added to the current span. This patch updates the appsignal version dependency to 2.2.13 or higher, and removes the duplicate checks from Appsignal.Plug.
Since appsignal 2.2.13 (which includes appsignal/appsignal-elixir#771 and appsignal/appsignal-elixir#772), the app's configuration is checked whenever parameters or session data is added to the current span. This patch updates the appsignal version dependency to 2.2.13 or higher, and removes the duplicate checks from Appsignal.Plug.
* Use Span.to_map to test Plug.set_conn_data/2 The current Elixir integration version automatically handles the skip parameter and skip session data options, meaning that logic can be removed from the Plug integration. To make sure everything keeps working, this patch adds two tests that ensure the params and session data is properly set right now, and after the removal. * Remove config checks for params and session data Since appsignal 2.2.13 (which includes appsignal/appsignal-elixir#771 and appsignal/appsignal-elixir#772), the app's configuration is checked whenever parameters or session data is added to the current span. This patch updates the appsignal version dependency to 2.2.13 or higher, and removes the duplicate checks from Appsignal.Plug.
* Use Span.to_map to test Plug.set_conn_data/2 The current Elixir integration version automatically handles the skip parameter and skip session data options, meaning that logic can be removed from the Plug integration. To make sure everything keeps working, this patch adds two tests that ensure the params and session data is properly set right now, and after the removal. * Remove config checks for params and session data Since appsignal 2.2.13 (which includes appsignal/appsignal-elixir#771 and appsignal/appsignal-elixir#772), the app's configuration is checked whenever parameters or session data is added to the current span. This patch updates the appsignal version dependency to 2.2.13 or higher, and removes the duplicate checks from Appsignal.Plug.
Currently, the send_params configuration option is checked in
appsignal_plug, in Appsignal.Plug.set_params/2-3.
Since parameters are now also added from appsignal_phoenix, and because
there's already a distinction between sample data and parameters in
Appsignal.Span, Appsignal.Span.set_sample_data/3-4 now checks the
send_params configuration if the passed key equals "params".
The implementation in appsignal_plug can be removed when depending on
the upcoming version of this library.