Problem with the deployment markers API call for new apps

Hello everyone,

we are trying to set the initial deployment marker on our application deployment. That is, when we deploy a new instance of our application we would like to use the deployment marker API method to set the initial version of that instance. That method requires the app id to apply the deployment marker on new relic. So our CI/CD job, that deploys the new application instance, performs a call to the applications/list API method, at some point, to try to get the app id so it could be used when calling the deployment marker API method. We tried by adding some GET requests to the deployed instance as part of the deployment process on our CI/CD job (using CURL) and then calling the applications/list API method, hoping that after some requests generating telemetry traffic to our new relic account, the deployed app could be listed. So far that approach has not worked because sometimes the application is listed right after performing those GET requests but sometimes the application is not listed at that point. Is there a way we could set the initial version for the application instance we are deploying? If that is not the case, is there a way to get the app id right after the application is deployed? Thanks!

Hi, @martin.fernandez: The application ID is created the first time New Relic receives telemetry data from an application; it can take up to 5 minutes for the data to be ingested. I do not know of any way to obtain an application ID sooner than that.

Hello @philweber, first of all thanks for answering the post. You’ve mentioned that it can take up to 5 minutes for the data to be ingested. How accurate is that time window? I mean could it be ensured that after 5 minutes the app id will be listed? Thanks again.

No, 5 minutes is not guaranteed. The agent installation UI says, “a few minutes or less”.