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

add ability to ignore some URLs #556

Closed
brettmc opened this issue Sep 29, 2021 · 2 comments
Closed

add ability to ignore some URLs #556

brettmc opened this issue Sep 29, 2021 · 2 comments
Labels
agent-php enhancement New feature or request

Comments

@brettmc
Copy link

brettmc commented Sep 29, 2021

Is your feature request related to a problem? Please describe.
In a setup where we have health checks pinging our PHP services, I would like to not have all of those microtransactions instrumented by APM. In my case, it's a php-fpm check which hits pm.status_path = /status directly:

"REQUEST_URI=/status HTTP_HOST=${HOSTNAME} REQUEST_METHOD=GET SCRIPT_NAME=/status SCRIPT_FILENAME=/status /usr/bin/cgi-fcgi -bind -connect localhost:9000"

Describe the solution you'd like
I'd like to see ELASTIC_APM_TRANSACTION_IGNORE_URLS implemented, along the lines of the nodejs implementation:
https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#transaction-ignore-urls
I would then like to set ELASTIC_APM_TRANSACTION_IGNORE_URLS=/status,/ping etc, and have those URLs not instrumented automatically.

Describe alternatives you've considered
If I could run some userland code, I'd $transaction->discard(), but an fpm status page only triggers built-in/pre-load code (bootstrap_php_part.php)

@brettmc brettmc added the enhancement New feature or request label Sep 29, 2021
@adamtester
Copy link

This is actually already implemented, but not in a release yet, see:
dc89ad2

In the meantime you can use dev-master in composer

@brettmc
Copy link
Author

brettmc commented Oct 3, 2021

Confirming that this is a duplicate of #82, and the implementation in master looks like what I need. Closing.

@brettmc brettmc closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-php enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants