newrelic / node-newrelic

New Relic Node.js agent code base. Developers are welcome to create pull requests here, please see our contributing guidelines. For New Relic technical support, please go to http://support.newrelic.com.
Apache License 2.0
967 stars 395 forks source link

HTTP method for transaction naming in newrelic config file #1573

Open leongc-sportsbet opened 1 year ago

leongc-sportsbet commented 1 year ago

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

We have transactions that aren't instrumented in the code and therefore we are using the configuration file to set transaction names based on the path. We do have transactions that may be a POST /abcd or GET /abcd but the current options only utilises the path name and so does not work for where we have HTTP method overloading

Feature Description

The ability to to specify the HTTP method as an optional parameter for the transaction naming rules

Describe Alternatives

A clear and concise description of any alternative solutions or features you've considered. Are there examples you could link us to? N/A

Additional context

An example of what I'd like to see would be:

rules: {
            name: [
                { pattern: "/abcd", method: "GET", name: "GET_abcd" },
                { pattern: "/abcd", method: "POST", name: "POST_abcd" },
                { pattern: "/abcd", method: "PUT", name: "PUT_abcd" }
]}

Priority

Please help us better understand this feature request by choosing a priority from the following options: [Really Want]

workato-integration[bot] commented 1 year ago

https://issues.newrelic.com/browse/NEWRELIC-7811