Skip to content

Add support for HangFire Jobs #2498

@TraGicCode

Description

@TraGicCode

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
            ...
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityTo tag external issues and PRs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions