newrelic / newrelic-dotnet-agent

The New Relic .NET language agent.
Apache License 2.0
97 stars 57 forks source link

Add support for HangFire Jobs #2498

Open TraGicCode opened 4 months ago

TraGicCode commented 4 months ago

Is your feature request related to a problem? Please describe.

It would be great if the newrelic agent had logic to automatically instrument hangfire jobs just like it does for NServiceBus. This would prevent having to always try and remember to add the Transaction Attribute along with setting the name of the transaction.

For Example, before my jobs execute, I have the following code.

       [Transaction(Web = false)] // 1. Create transaction
        public async Task MyHangfireJob()
        {
            NewRelic.Api.Agent.NewRelic.SetTransactionName("Hangfire", $"MyHangfireJob"); // 2. Change Transaction Name
            ...
        }
workato-integration[bot] commented 4 months ago

https://new-relic.atlassian.net/browse/NR-272629

nrcventura commented 4 months ago

Thank your for this request. I passed on this information to our Product Manager, so that it can be reviewed and considered.