The bug was resolved that was affecting key transactions and the node agent.
I still want to revisit this issue. We decided to turn on our custom throttling code as some of our users like to relentlessly hit our URLs to get the most up-to-date data. Our throttling will incrementally slow down users and then finally issue a 429 HTTP Code to them. This is good behavior with our application but the ApDex and notifications start getting sent from NewRelic because the response times start getting reported past our 150ms threshold; the slowdown is desired behavior.
What is needed is, a programmatic way in our code, to tell NewRelic to not report the ApDex for those requests that are coming in. Setting up Key Transactions doesn’t help because the only thing that currently separates application access to these URLs from the API-style users is the fact that they aren’t part of a Referer/IP whitelist that we maintain server-side. We know in our code when a request is coming in as an API-style and it would be perfect to be able to set a variable for those instances, something that gives us access to the transaction to perhaps dynamically change:
const t = newrelic.getTransaction();
t._transaction.traceFlag = false;
Not sure if that is the correct property but it seems to be on the right track.
Hi @craig_hoover. Do you have a way to determine whether or not a particular transaction is being throttled due to the client reapeatedly hitting the URL? If so, you could use
setIgnoreTransaction(ignored) inside a logic check for these transactions so the agent will not continue recording them. That would be the best immediate solution.
From there, I suggest heading over to the feature idea section for the Node.js agent and adding a request for a
setIgnoreApdex() API method:
Our product managers review all of these requests, and the more votes a request gets, the higher the priority it will get for a future release.