I have a .net core app being monitored by new relic.
There are multiple Transactions in this app. The Transactions are not reporting to new relic consistently. Below is the code. I can see the logs in my app’s log file with the correct values, but nothing is reported to new relic sometimes. What could cause this issue?
IAgent agent = NewRelic.Api.Agent.NewRelic.GetAgent();
ITransaction transaction = agent.CurrentTransaction;
transaction.AddCustomAttribute(MonitorAttribute.TenantId, consumerResult?.TenantId);
transaction.AddCustomAttribute(MonitorAttribute.EventType, consumerResult?.Message?.Header?.EventType);
transaction.AddCustomAttribute(MonitorAttribute.MessageDirection, MonitorMessageDirection.Subscribe);
logger.LogInformation($"TenantId: {consumerResult?.TenantId}; " +
$"EventType: {consumerResult?.Message?.Header?.EventType};" +
$"MessageDirection: {MonitorMessageDirection.Subscribe} " +
"should be reported to Monitor");
- APM Agent Language: C# .netcore
- APM Agent Version: 9.2.0
- Operating System: Windows 10 Pro
- Operating System Version: 10 Pro
- Frameworks your app is using: .net
- A link to the application in the New Relic UI. https://one.newrelic.com/launcher/nr1-core.explorer?platform[accountId]=3317066&platform[timeRange][duration]=10800000&pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlHdWlkIjoiTXpNeE56QTJObnhCVUUxOFFWQlFURWxEUVZSSlQwNThNVFF5TXpJeU1qQTBOQSJ9&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwic2VsZWN0ZWROZXJkbGV0Ijp7Im5lcmRsZXRJZCI6ImFwbS1uZXJkbGV0cy5vdmVydmlldyJ9LCJlbnRpdHlHdWlkIjoiTXpNeE56QTJObnhCVUUxOFFWQlFURWxEUVZSSlQwNThNVFF5TXpJeU1qQTBOQSJ9&state=55f45060-5999-281c-4a95-6e526e3eba25