Splunk AppDynamics

Data collector for fetching http request properties

Mattias_Wessman
Explorer

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!

/Mattiasimage.png

Labels (1)
0 Karma
1 Solution

Mattias_Wessman
Explorer

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

View solution in original post

Joshua_Lyons
Explorer

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.

 

image.png

Mattias_Wessman
Explorer

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

image.pngimage.png

0 Karma

Mattias_Wessman
Explorer

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

0 Karma

Mattias_Wessman
Explorer

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?

0 Karma

Joshua_Lyons
Explorer
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
Explorer

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.

0 Karma

Mattias_Wessman
Explorer

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

Mattias_Wessman
Explorer

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

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...