lundi 13 juillet 2015

How do I test New Relic (in Python) during local development?

I'm interested in using the New Relic Python agent's concept of a data source to capture a custom metric via polling. The documentation is clear enough that I think I understand how to set that up; but (understandly) I'd like to verify my code locally before deploying it.

What I'm not seeing from New Relic's docs is a way to test code that collects custom metrics locally, without actually sending data to New Relic's servers. I see that there's a developer_mode configuration setting; but it seems like that just verifies that nothing breaks code-wise (not that my custom metrics actually work). I tried enabling that in tandem with the log_file setting in the hope that it would produce some logs that would show me what New Relic will do once I deploy my changes; but that didn't seem to produce any logs.

How is this generally handled? Do most teams using New Relic just have a dev application (that they pay for) and report stats to that during local dev? Do they not test their New Relic stuff locally?

Aucun commentaire:

Enregistrer un commentaire