Created
June 25, 2013 16:46
-
-
Save drub0y/5860125 to your computer and use it in GitHub Desktop.
This is a proof of concept (read: not tested yet) Owin module that one could configure in an Owin pipeline to ensure that NewRelic will ignore the transaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NewRelicIgnoreTransactionOwinModule | |
{ | |
private AppFunc _nextAppFunc; | |
public NewRelicIgnoreTransactionOwinModule(AppFunc nextAppFunc) | |
{ | |
_nextAppFunc = nextAppFunc; | |
} | |
public Task Invoke(IDictionary<string, object> environment) | |
{ | |
// Tell NewRelic to ignore this particular transaction | |
NewRelic.Api.Agent.NewRelic.IgnoreTransaction(); | |
return _nextAppFunc(environment); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment