Is it possible to set custom attributes to a Log based on its source? Similar to how Sumologic allows a collection to add custom attributes. The issue is the logs coming out of the Heroku log drain. When having multiple sources, they need separate attributes for application and environment. The procid provided by Heroku is not enough, since that is using the standard configurations of web or worker.
Yes! If you can pass the custom attributes as key-value pairs along with your JSON payload, they will be stored and can be queried later. More details on the information that can be passed to New Relic Logs end point can be found here.
Hope it helps!
Is there any way to search or filter by the drain token? According to Heroku, it is written into the log messages. But I don’t see it in any of the attributes in New Relic.