cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to have multiple custom rule for a .NET POCO

sharmashilpa
Creator

Hi,

 

I have a POCO class(say for ex, ClassA), which calls various private methods based on the payload type.

I need to capture the business transction for each of the these payloads.

If I create a custom rule for ClassA, I don't get the transactions for the rest of the methods.

Tried giving lower priority to custom rule for ClassA, and higher priority to custom rules for private methods.

 

I dont see any of the business transactions returned.

Any suggestions?

 

Thanks.

11 REPLIES 11

Raunak.Mohanty
AppDynamics Team (Retired)

Hi,

 

  If the private methods you are trying to create Custom Match Rule on is oart of on-going BT then new BTs will not be created. For example if you have a class definition like this

 

Class Test{
  Private void Method1(){
  Method2();
}
Private Method2(){
Method3();
}
Private Method3(){
  DoSomething();
}

}

And you create a POCO rule on 

 

Class : Test

Method : Method1

 

Then creating other rules on same Class and different methods called by Method1 like Method2, Method3 will not yield new BTs are then are part of BT started for Method1

 

Let us know if you are talking about a different scenario. Please provide screenshots where necessary.

 

Thanks,

Raunak

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

What happens when I create a Rule on Method2, Method3.

But Method1 business transaction is Auto Discovered.

 

My code would be similar to this:

class Test
{
	public void Method1()
	{		
		if( someCondition)
		{
			Method2();
		}
		else
		{
			Method3();
		}
	}
	
	private Method2()
	{
		SomeFunc();
	}
	
	private Method3()
	{
		DoSomething();
	}
}

How do we handle this scenario?

 

Raunak.Mohanty
AppDynamics Team (Retired)

You have two options

1) Disable OOTB BT identification at Method1 and create POCOs on Method2 and Method3 to track them

2) Create Service End Points on these Methods

https://docs.appdynamics.com/display/PRO44/Service+Endpoint+Detection#ServiceEndpointDetection-Confi...

 

Ideally, you do not need to track these methods separately because they are already part of an ongoing BT and in case they are slowing down the BT will track it in form of snapshots.

 

You can also create InforMation Points on these methods in case you just want to track basic metrics like ART, Call/Min, errors etc

https://docs.appdynamics.com/display/PRO44/Information+Points

 

Thanks,

Raunak



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

To continue with this thread...

 

 

I have been facing a similar issue with this. I went ahead and tried the approach you suggested with adding service endpoints. I tried the similar appoach with method1/method2/method3 but for service endpoints and faced the same issue where method1 gets collected but not 2/3. Most likely this is because method1 contains method2/3. Should I expect to see all 3 methods shows up as seperate service endpoints? 

 

Info point does show them seperate but I can not do data collectors on it or set up a custom dashboard. 

 

There seems to be a lot of pros/cons for each of these features but not a solution that can provide everything.

 

Raunak.Mohanty
AppDynamics Team (Retired)

Hi  haysam,

 

  I will run few tests to verify if SEP will not work in this scenario. But I will like to understand the reason behind trying to creating an entry point on already tracked code path.

 

In case you will like to collect data from these methods ( like from method parameter or return value) then  Method Invocation Data Collector is way forward.

https://docs.appdynamics.com/display/PRO44/Data+Collectors

 

The collected data will show up in transaction snapshots.

 

Thanks,

Raunak



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Raunak.Mohanty
AppDynamics Team (Retired)

Hi,

 

  Had a quick discussion with the team and seems like you might be hitting limitation as described in the following document

https://docs.appdynamics.com/pages/viewpage.action?pageId=45490396#AppAgentNodeProperties(M-R)-max-s...

 

You may want to increase the node value but I suggest you review my previous update which should give you deeper insight.

 

Thanks,

Raunak

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

I just have one service endpoint created, that should not be an issue.

 

 

The idea was to have individual business transcations show up for different requests (e.g. when a request comes in, it can be branched into 1 of 10 "endpoints") the problem here is that when we excluded the parent BT, we did not see the children endpoints show up. If we chould show the custom BT for a pipeline, then we can create custom dashboards for them as well as set up alerts. Given that one BT will pick it up and not show the children BT makes us have to go through each one to determine where something broke. 

 

Based on the documentation, it states that custom BT will take priority over the auto-detect BT. I can validate that this is not the case, even when I increase the priority for the custom BT as well as exclude the auto-detected BT. The only way for me to present those BT is by disabling auto-detection completely.

 

To confirm, info points do present the data that we are expecting. We are just a bit confused as to why the children BT are not showing up when we excluded the parent auto detected BT.

Raunak.Mohanty
AppDynamics Team (Retired)

Hi Haysam,

 

  Can you confirm the type of BT that is getting idenOOTB? OOTB ? Is it Asp.net/WCF/Web Services or anything else?

If you exclude the Parent BT, then you should be able to create a POCO rule and split it the way you want.

Also if the Parent BT was identified as Asp.Net then you can create a Asp.net Custom Match Rule with higher preference and that will take preference. But if you create a POCO rule then it will not get the preference.

Again if you could send out some screenshots of what you have tried that that has not worked we will be happy to help.

 

Thanks,

Raunak

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.