What type of API key should I use for sending custom logs from my frontend application?

We wanted to add custom logs to the new relic from our frontend application and we were planning to go ahead with logging using the rest API call approach (https://developer.newrelic.com/collect-data/collect-data-from-any-source/). I was looking into types of API keys (New Relic API keys | New Relic Documentation) and am planning to use the License key for ingesting our logs to new relic, but I wanted to know if there is any other type of API key that would be better for my use case or if not does this API key provide any other access (Read or updating logs) other than logging. It would be great if you could provide details about any other thing that would be exposed with this API key (other than data ingestion would ) . Are there any other security concerns if I use this API key?

@JoiConverse @tpaul1 @sduvall @stefan_garnham This is a major blocker for my project. Any help is appreciated.

Any reason you cannot write out to logs and use the logging integration as normal? Much simpler approach.

I am new here and am not aware if there is a way to ingest custom logs from my React js app. It would be great if you could point me to the docs.
Thanks, @stefan_garnham.

I would suggest reading the Getting started with log management which has information on the various ways to ingest logs.

I went through the docs but did not found anything other than the newrelic Log Api for my frontend application.

Hello there, you are correct that the License Key is the best fit for Logging API ingest use. You can generate and label a new License Key just for this purpose, for ease of management.

Since you’re working with a React app, our Browser Monitoring solution set would also be appropriate. You can read about some ways to use it here: Browser monitoring best practices guide | New Relic Documentation

For SPA monitoring specifically, we have a list of requirements which you can review: SPA compatibility and requirements | New Relic Documentation

If you can let us know some more details about what type of metrics you want to log from the front end, we can make some more specific recommendations too.