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!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...