Skip to content
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

Merged
merged 2 commits into from
May 27, 2022
Merged

Conversation

jeffkreeftmeijer
Copy link
Member

@jeffkreeftmeijer jeffkreeftmeijer commented May 25, 2022

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.

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type: "add"
type: "fix"

Is it not a bug fix?

Copy link
Member Author

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.

@jeffkreeftmeijer jeffkreeftmeijer merged commit 0216690 into main May 27, 2022
jeffkreeftmeijer added a commit that referenced this pull request May 27, 2022
* 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.
jeffkreeftmeijer added a commit that referenced this pull request May 27, 2022
* 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.
@backlog-helper
Copy link

backlog-helper bot commented May 27, 2022

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

jeffkreeftmeijer added a commit to appsignal/appsignal-elixir-plug that referenced this pull request May 30, 2022
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.
jeffkreeftmeijer added a commit to appsignal/appsignal-elixir-plug that referenced this pull request May 30, 2022
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.
jeffkreeftmeijer added a commit to appsignal/appsignal-elixir-plug that referenced this pull request Jun 1, 2022
* 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.
jeffkreeftmeijer added a commit to appsignal/appsignal-elixir-plug that referenced this pull request Jun 1, 2022
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants