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

How to filter sending transactions to Sentry on request IP address? #2019

Closed
zedtux opened this issue Mar 13, 2023 · 5 comments
Closed

How to filter sending transactions to Sentry on request IP address? #2019

zedtux opened this issue Mar 13, 2023 · 5 comments
Assignees
Labels

Comments

@zedtux
Copy link

zedtux commented Mar 13, 2023

There is a probe which is producing a lot of requests to my app, which produce a lot of transaction pushed to Sentry.

I found from the documentation the before_send_transaction but I can't figure out where to find the request IP address from the event parameter.

So, could you please help me in order to access the Rails request IP address so that I can filter the transactions pushed to Sentry?

@sl0thentr0py
Copy link
Member

@zedtux we filter the IP address headers here so they won't be present in the event.request.headers object if send_default_pii = false.

You can however use sampling_context[:env] in your traces_sampler as outlined here to not sample those transactions.
#1830 (comment)

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@zedtux
Copy link
Author

zedtux commented Apr 6, 2023

I know bot, I will give it a try as soon as possible, stop boring me, delete yourself.

@zedtux
Copy link
Author

zedtux commented Apr 21, 2023

Quick update, just to not get bothered by the stupid bot. 😉. It's still on my list to try the suggested answer!

@sl0thentr0py
Copy link
Member

this has been open for fairly long so closing, please re-open if you need help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants