No longer able to manage Heroku log drains

Logs question template

Please describe the behaviour you are seeing, and how that differs from your expectations

When I attempt to list Heroku log drains tokens, I get an error saying that they cannot be listed. I have tried this with and without uBlockOrigin on, on Firefox and Brave. The call that fails appears to be
GET Log in to New Relic
The undefined is failing the call with a 400.

I also cannot add new log drain tokens for the same reason.

Please describe how you are forwarding log information to New Relic, which plugin are you using, and are you seeing any errors when doing so?
We are using the New Relic Heroku log drain managing according to the New Relic docs for setting up log drains. We are seeing no errors on the application side.

Hey there @jason.litton,

I hope you are well, welcome to the community!

I see you are having trouble viewing a list of your Heroku drain tokens. I believe this doc here can help provide some context on this: Stream logs from Heroku | New Relic Documentation. More specifically you can use the following command to list your Heroku drain token mappings from your New Relic account:

curl -H ‘api-key: YOUR_NR_LICENSE_KEY’ https://log-syslog-configuration-api.service.newrelic.com/heroku-account-mappings?accountId=YOUR_NR_ACCOUNT_ID

I am also looping in an expert from our log team to provide some context and uncover anything I may have missed to get you moving again. Please reach back out if this was able to help you and don’t hesitate to hit the solution button to help future explorers find an answer to their question. If you have anything else you need help with or have more questions please let us know so we can continue to provide support!

I hope you have a great day!

Hello @michaelfrederick . This did not help at all. The problem is that, with the token in hand, I cannot manage the key within New Relic. The UI is breaking and not able to call to either list keys or add keys. The problem is on the New Relic side.

Hey @jason.litton,

Thank you for letting me know this was unable to help you resolve this. I am sorry you are still experiencing issues. Our engineering team is working on this and will respond with further insight and potential solution for you shortly. We appreciate your patience as we continue to provide support.

Hello @jason.litton ,

Thank you for being patient with the support. I will help you with this issue until resolution.

Also please check the Endpoint , as there is different endpoint for EU account mentioned HERE

Please check that the correct permissions to configure Heroku logging on your account. You need to have Full Admin privileges .

You will need to work with your org to get you Admin privileges on your account or ask an Admin to configure logging for you.

ALSO after completing the above please see this guide if you are not still able to configure it :-

The most common issue with Heroku drain tokens is accidentally associating a token with the wrong API key when initially setting up logging.

First try the following:

  1. Delete your current Insights Insert API Key (as long as nothing else is using it) and then create a new one.
  2. Remove the related drain token in Heroku using heroku drains:remove syslog+tls://[newrelic.syslog.nr-data.net](https://newrelic.syslog.nr-data.net/):6515 -a your-app-name.
  3. Start over from the beginning using the new Insert key and drain token.

Please do not hesitate to contact me in case of any additional queries or issues. I will be happy to help you.Looking forward to hearing back from you

Best Regards
Yashaswi verma

I am experiencing this same issue. Is there an api call similar to the list api call “curl -H ‘api-key: YOUR_NR_LICENSE_KEY’ Log in to New RelicYOUR_NR_ACCOUNT_ID” that we can use to register new mappings?

Hi @dev409

Thanks for reaching out for support.

I hope you are well, and congrats on your first post!

This is a tricky one, im not sure its the same root cause as the others mentioned in the thread. However I am able to reproduce the issue. I will go ahead and loop in the support engineer here to also have a look. As I am unsure what triggering this issue.

Please note they will reach out here with their findings. Should you have any updates or questions, we are here so please feel free to reach out!

@yverma1 Thank you for those steps, but none of them address the actual issue. I’ll try to be clearer. The issue that I am experiencing is entirely within the New Relic UI for managing log drain tokens. There is nothing wrong or unclear on the Heroku side. I am able to do all the Heroku actions I need to and everything there works as expected. The problem occurs when I try to use the New Relic UI to manage my log drain tokens.
When I go into “Add Data → Heroku”, I get this error message:
Screenshot 2022-05-31 at 09-31-10 setup-heroku Add data New Relic One

And my list of drain tokens is empty:

When I open the developer tools networking tab, I can see that there is a failing call to
https://log-syslog-configuration-api.service.newrelic.com/heroku-account-mappings?accountId=undefined.

To make it very clear this call is from the New Relic UI to the New Relic backend. I have no control over this call. This is a UI bug. The UI is setting our accountId to “undefined” in this call. This is the issue that I am seeing. It has nothing to do with adding drains to Heroku directly or getting those drain tokens from heroku. It is a bug in the New Relic UI that is preventing me from managing my drain tokens.

1 Like

hi @jason.litton

I have gone ahead and reached back out to the support engineer on this. Apologies that you are still facing the issue.

Please note the support engineer will reach out here with their findings.

hi @jason.litton there was an issue that engineering pushed a fix for yesterday. can you try to add the drain token again and report back if you’re still experiencing this behavior. thanks!

1 Like

@troycox Yes. This works now. Thank you for the help.

Hello @dev409 can you let us know if the recent update fixed this for you as well? Thanks!