Configuration to change the API endpoint for newrelic:notify-deployment
Closed this issue · 2 comments
In a current project I switched a Symfony application that is also using this bundle to an AWS instance. With this migration to a new "server", a new New Relic account and new Apps were created in New Relic. While the communication for the metrics of the server is working, the command newrelic:notify-deployment
does not work and returns the error message
Deployment not recorded to 'myappname': Received HTTP status 422
but "myappname" exists and shows collected metrics. During my research, I found the reason why this command does not work with the help of a REST API tester. The problem was the domain name of the hardcoded API endpoint in the command: https://github.com/ekino/EkinoNewRelicBundle/blob/master/Command/NotifyDeploymentCommand.php#L119.
While api.newrelic.com
did not work and resulted in the mentioned error message, api.eu.newrelic.com
, which is used by the new New Relic instance, worked fine and set a deployment flag successfully.
My approach would be to add a new optional configuration to the EkinoNewRelicBundle that makes the API endpoint configurable.
I agree.