cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

NET (Agent, Installation)

Data collector for fetching http request properties

SOLVED
Mattias.Wessman
Builder

Data collector for fetching http request properties

Hi!

 

I would like to fetch HTTP request properties (not headers, not parameters) - according to attached picture; like RawUrl, UrlReferrer, or any other HTTP request property. Looking into transaction snapshots -> any given segment -> More -> Properties they're all there - but how do I go about creating a data collector for fetching any of these properties? Been looking into https://docs.appdynamics.com/display/PRO45/Using+Getter+Chains which seemed promising, and thinking about method invocation data collectors - but haven't really succeeded yet.

 

Anyone been able to create a data collector fetching HTTP request properties?

 

Thanks!

 

/Mattiashttp_request_properties.PNG

By replying you agree to the Terms and Conditions of the AppDynamics Community.
Data collector for fetching http request properties
8 REPLIES 8
Joshua.Lyons
AppDynamics Team

Hi Mattias,

 

Here is an MIDC example to get the UrlReferrer property of the Request in an MVC app.  You would use the Invoked Object and a Getter Chain that simply uses the Request object and any property.

 

Request-UrlReferrer-MIDC.png

Mattias.Wessman
Builder

Thank you very much! Will give it a shot right away

Mattias.Wessman
Builder

Method signature? Guess it depends on the application? Examples:

entry_point_http_request.PNGentry_point_http_request2.PNG

Mattias.Wessman
Builder

Ended up fetching HTTPContext from System.Web.UI.Page.ProcessRequest - and Request is a property of the context:data_collector_http_request.PNG

Mattias.Wessman
Builder

Unfortunately no data is being collected based on System.Web.UI.Page.ProcessRequest (https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.page.processrequest?view=netframework-4.8#...) - Parameter @ index 0 = HttpContext, fetching property Request from HttpContext and UrlReferrer from Request.

 

Am I missing something?

Joshua.Lyons
AppDynamics Team

In your case you will need to add the fully qualified path which includes the Current context like so:

ParamIndex_0.Current.Request.UrlReferrer

You can read about why in the Remarks here in the Microsoft docs. https://docs.microsoft.com/en-us/dotnet/api/system.web.httpcontext.request?view=netframework-4.8#rem...

Unfortunately, I am not on my dev machine to confirm this as I normally would but if my memory serves me, this should get you the results you need.
Mattias.Wessman
Builder

Unfortunately I can't get my data collector to pick up any HTTP request properties. Using Current.Request.UrlReferrer, also tried Request.UrlReferrer etc. Either I'm doing something wrong, or I've stumbled upon a bug! Any advice would be highly appreciated.

Mattias.Wessman
Builder

Weren't able to get the MIDC working - therefore fetched HTTP header Referer instead as a workaround.