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

Custom JSON endpoints showing up in root app #6

Open
pmgarman opened this issue Dec 22, 2017 · 3 comments
Open

Custom JSON endpoints showing up in root app #6

pmgarman opened this issue Dec 22, 2017 · 3 comments
Assignees

Comments

@pmgarman
Copy link
Member

Custom wp-json endpoint traces are being captured in the root site app, I would have expected these to show up in an API app - is this doable?

@pmgarman
Copy link
Member Author

pmgarman commented Dec 22, 2017

I may just be running an old version... from my composer.json

"mindsize/mindsize-newrelic": "^1.1",

@javorszky can you confirm that this is how it works in the latest version of the app though? if so - can you tag it as a new version and push it please? :)

@javorszky
Copy link
Contributor

that composer.json doesn't show up

It should be doable. Essentially I'm waiting until rest_api_init to set a transaction, and if the global REST_REQUEST is set (and is true) at that point, the config is set to rest transaction

No transaction should be in the root app to be honest, because the frontend is a catch-all.

All contexts are checked at points that definitely fire within WordPress.

I'm at a loss as to why this would happen.

Can you lower the threshold and capture a trace?

@javorszky
Copy link
Contributor

btw, the reason I wait until rest_api_init and check for REST_REQUEST is precisely because custom rest routes, so I don't miss them if I only preg_match the url to contain wp-json or something similar

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

No branches or pull requests

2 participants