newrelic-dotnet-agent icon indicating copy to clipboard operation
newrelic-dotnet-agent copied to clipboard

Support base class for TransactionAttribute and TraceAttribute.

Open malylemireflo opened this issue 1 year ago • 2 comments

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

I don't want to add a TransactionAttribute to every class that inherits from a base class where I could add the transaction attribute.

Feature Description

Scan base classes for TransactionAttribute and TraceAttribute.

Additional context

Add any other context here.

Priority

[Must Have]

malylemireflo avatar Dec 21 '23 20:12 malylemireflo

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

@malylemireflo Thanks for your request. We will add this to our backlog and consider for implementation in a future release.

tippmar-nr avatar Jan 10 '24 21:01 tippmar-nr

This issue won't be actioned.

After some investigation, our initial assumption was correct. If the child class does not override the method, it works as requested. If it’s an override method, the attribute is not present. There are no methods available for getting direct access to the base method from the current method as we’re checking it. All we can access is the parent class, which still means we have to enumerate the methods of that class looking for a match, and then check the attributes on that method. While technically possible, this would add a significant amount of complexity and overhead to the Profiler. I don’t think this is worth implementing at this point.

chynesNR avatar Jun 14 '24 17:06 chynesNR