• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by matt S. · Aug 02, 2013 at 07:53 PM ·

Why can't I instrument this method?

This is a .net website using auto sensors version 5.5. I want to know every time this method fires, which should be on every app start

protected void Application_Start(Object sender, EventArgs e)

I've tried several things without success

 

  1. Since I'm on auto sensors I look for it in methods scanning a large timespan where I know the app has been restarted (also because I restarted it myself). 
  2. I manually added a sensor for it first with the default selections (in the dialog) then with everything set with the maximum flexibility
    1. Class Pattern contains ourcompary.Web.Global
    2. Pattern contains Application_Start
    3. Visibility public / default / protected / private
    4. Methods with any arguments
  3. Looking at all the methods I only see a very small subset of my methods versus all of the frameworks. I then sensored my entire codebase at the root level name space. After I began seeing methods in my Web.Global class but only the 2 that I overrode. 
  4. I created a business transaction and created a measure based on the method using the method name measure. Obviously that doesn't work since the method isn't even being sensored.

 

Why is this not working as designed?

 

 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

5 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by matt S. · Aug 06, 2013 at 04:57 PM

Rob & Andreas, that was the answer thanks! I had thought about that as well and was going to make that my next step but I'm glad you confirmed my thoughts. It makes sense now, IIS runs on one thread and the apps run on others. I'll try to see where up on the chain I can place this.

When I added the sensor and was looking at the results it seemed like the purepath never ended which would make sense because the application doesn't stop until the pool shuts down. My test environment license just expired and I need to set this up in prod to see it again. 

 

Reinhard Brandstaedter, Thank you. I never noticed that tab before. That's handy

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Reinhard W. · Aug 03, 2013 at 11:33 AM

And maybe check in agents overview the deployed sensors on the particular agent to check if the sensor was really placed

You should be able to see this method/class in the list of placed sensors even though you do not see it on PurePaths yet. If it is there you likely must adopt the sensor configuration to "Active and start PurePath" as rob suggested. If it's not there the sensor definition is wrong or hotsensorplacement or restart hasn't happened.

 

Reinhard

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Rob V. · Aug 02, 2013 at 10:34 PM

Are you sure that your Application_Start method will be invoked in the context of a PurePath? How, when, and where is it invoked? Note that there are just a few sensor packs by default that contain methods that can start a new PurePath: ASP.NET, .NET Web Services, .NET Components, .NET WPF, and .NET WIndows Forms. If your method is not called in the context of a transaction that starts via one of those "entry point" sensor packs, then it will just be dropped on the floor.

Try this experiment: augmenting your sensor definition above, set the "Capture" for your sensor to be "Active and Starts PurePath". This way when this method is seen, if it's not in a PurePath now, it will be allowed to start a new one. Let me know if you see it then.

Rob

Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Andreas G. ♦ · Aug 04, 2013 at 07:34 PM 0
Share

I agree with Rob. Application_Start will be called "outside" the regular Web Request Transaction scope - thats why you dont get a PurePath with our Out-of-the-Box Sensors and therefore you dont get to see it captured by the Auto Sensors either. Creating a Custom Entry Point for that method is the way to go.

If you want to drive this a bit further I suggest that you may even define an entry point "higher" up in the call chain. I think that the ASP.NET Engine will have a couple of initialilzation routines it calls during App Startup. It might be interesting to get to see all of them in one single PurePath that starts from one of the methods that eventually ends up calling your App_Start

avatar image

Answer by matt S. · Aug 02, 2013 at 10:33 PM

I checked the exclusions and it wasn't that. Mycompany.Web.Global extends the frameworks System.Web.Global 

 

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Lopes D. · Aug 02, 2013 at 08:24 PM

It sounds like there might be a global exclude somewhere for those methods, what classes does your class that contains the Application_start method extends?

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A