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
Why is this not working as designed?
Answer by matt S. ·
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
Answer by Reinhard W. ·
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
Answer by Rob V. ·
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
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
JANUARY 15, 3:00 PM GMT / 10:00 AM ET