Logs are not in context (incorrect entity GUID?)


We have on our web server (virtual machine):

  • IIS with app pools automatically reporting to the APM module in New Relic
  • The New Relic Infrastructure agent reporting to the infrastructure module
  • .NET apps using NLog and the NewRelicJsonLayout and the NLog log enricher (v1.2.1)
  • The New Relic Infrastructure agent successfully reporting logs from a single apps log file

However, I am unable to see the logs in context. The “Service name” is not a link when viewing the log entry in the UI.

My suspicion is that the log enricher seems to be sending incorrect data in the log entry:

“hostname”: “name-of-host-a”,
“entity.guid”: “some-guid-for-host-a”,
“entity.name” “some-app-name”

How do I enable logs in context?

Should entity.guid be the GUID of the NR app whose name has the value of entity.name?

Thank you!

This is a red herring I believe!

I mistakenly assumed that the service name would be a link from the log entry, just like the hostname field next to it was.

Once I fixed a problem where my error was being caught and not reported to the APM I was able to go into the error and view the logs for that trace. This is the part that was most important to me!

For anyone reading this, the json properties are likely correct and I was suspicious for no reason.

Thank you!