![]() And finally, the transactionNamingPriority attribute tells the agent how to prioritize names, should it receive multiple names during the transaction. The metricName attribute defines the category of the transaction (“Custom”) that shows up in the UI drop-down on the Transactions page, followed by the the actual name of the transaction (“MethodOne” or “MethodTwo” in this case) as it will appear in the UI. In this example, the first tracer factory defines the transaction and the additional tracer factories define details within the transaction (note the removal of the name attribute). But, there is another option for naming your transactions that does not require a code change that may fit your needs.īy instrumenting additional methods within the custom transaction and setting the metricName and transactionNamingPriority attributes of those methods, you could change the name of the metric based on the code path of the transaction.įor example, if you had a custom transaction named “MyTransaction” which called either “MyMethodOne” or “MyMethodTwo” based on an IF statement, you could change the name of the transaction based on which method it called by setting your custom instrumentation file up like this… There are no regex matchers or other ways of adding dynamic values to the XML files. Then I could say match Dispatcher but the transaction starts 1 call down.Īs another option, could you write a ? Maybe you could use a matcher but then say I want the stack frame below the match so if a have this: I was wondering if you could detect a class that implements an interface like IConsumer, or if there was something like a regex matcher. MassTransit.dll!.AnonymousMethod_8(object x) Line 180Ĝ#Īh ok, so there’s no way to do this without making a code change? M圜!M圜.AnimalCommandConsumer.Consume(MassTransit.IConsumeContext message =, System.TimeSpan timeout) Line 354 Unknown Is this possible? How would I go about doing this?įor reference this is the stack after breaking inside a consumer. For my scenario I’d want the name to be the Consumer Name or the Message Type Name. In an mvc application the name will be the controller name the action name. However the docs don’t really say how to do this. ![]() I’ve looked at the docs and it appears that I need to name the transaction. I’ve created a custom.xml file in the \Extentions folder and I can see the transaction showing up however they all have the same name. Public void Consume(IConsumeContext message)Ĭonsole.WriteLine("The AnimalCommand consumer runs") public class AnimalCommandConsumer : Consumes.Context Messages enter the system by being “consumed” by Consumers. ![]() I’m setting up custom transaction logging for a service that uses MassTransit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |