cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Grab a specefic property from a session object

Mohamed.Adel
Builder

Hello,

Our application session is not a plain key-value pair, it contains an object called "UserInfo" and within this object, there are many properties.

 

Can I grab a specific property from this object from the HTTP request data collector?

Example:
UserInfo = { "userId": 123, userName: "BlaBla", ...}

2 REPLIES 2

Mario.Morelli
Architect

Hi Mohamed

 

You can try a data collector like below and assign it to the business transaction to be extracted, which should return the userId value, you can adjust it to extract any of the values if you require it.

 

ToString().Split(string/"userId": ).[1].Split(string/,).[0]

 

Ciao



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

Hi Mario,

Unfortunately, this didn't work, let me explain that more, I added "SSO:CurrentUserInfo" as a session key in the HTTP request data collector, the value was "BARQ.SSOClientIntegeration.UserInfoDto" as a string, and I need to grab "userId" property from the returned UserInfoDto.

June 26 Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here
Top Kudoed Authors