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

This product reached the end of support date on March 31, 2021.

UEM visits grouped by User

anusha_kodimela
Organizer

 

Hi,

 I would like group the visits based on the user name or location,but the visits are all coming with a comman name as local network.what might be the issue?

When i group by location,by default its taking as local network.

Please find the screenshot below.

 

Thanks and Regards.

K.Anusha

91 REPLIES 91

carlos
Inactive

Hi Anusha,

By looking at the screenshot, I think you should define locations maps, and load them into dynaTrace, since I guess you are using a default locations scenario, and all it can show are local networks (10.22.x.y, 10.24.x.y). (local meaning "internal networks, local to the app server)

So if you can define 10.22.16.0/24 as i.e. Toronto, Sales Office or so, you can have a split.

Username:

In order to show/list the user names there, you must use a Split and then Tag for UEM using that Split. i.e. for .Net apps, you can define usage of LOGON_USER variable, captured from a .Net app/app pool. Create a Split and then set up a Tag.

For Java, you may retrieve the username from any given method, memory sensor, servlet, etc...

 

Hope this helps,
Carlos. 

 

srikar_mohan333
Inactive

Hi Anusha,

Adding to Carlos's comment below are the steps to tag a visit with a user name:

1) configure dynatrace to capture the contextual information, in this case the user name, from cookie/method argument/method return value/ etc...

2) create a measure that extracts the user name

3) assign the respective measure to the 'tag visit with' under uem specific to the application

Below are screen shots from a demo app

1) we are capturing the user name info from a method by adding a method sensor

2) we create a measure to extract the user name

 

3)  we use the measure created above to tag a visit

 

Hope this helps.

Srikar

srikar_mohan333
Inactive

Some Additional comments from the screenshot you provided:

I see that you have visits with only 1 user action...is this expected in your application? You may want to ensure that the dtcookies are being set correctly

All the IPs are showing up the same (perhaps a nat'ed ip)...dynatrace gets the ip information from the request headers...if x-forwarded-for is set then that can be used to get the clients real ip

anusha_kodimela
Organizer

Hi Srikar Mohan,

 

How to check the dtCookies are being set correctly so that i can get a real IP?

anusha_kodimela
Organizer

 

Hi Carlos,

As per your comment :By looking at the screenshot, I think you should define locations maps, and load them into dynaTrace,

Kindly let us know how to set the default location maps .

 

carlos
Inactive

Hi Anusha,

Srikar makes a very good point, that it seems like you are testing one single action from a couple of devices (but both have almost the same IP - 2 different segments), so we are probably looking at a proxy IP address/NAT'ed address.

Here is a screenshot on where to load IP specific mappings, open dynaTrace client -> Settings -> dynaTrace Servers and look at the check marks below (if you have several networks/segments, you can load a csv file with the mappings).

Also, you may define a specific header in order to retrieve and display the real client IP.

anusha_kodimela
Organizer

 

Hi Srikar,

The X forwaded for has been set i believe.Please find the screenshot below.

 

 

 

 

Hi Team,

 

As per the 3 steps u have mentioned to Tag the measure,we are facing difficulty in creating the new method sensor,Could you please share the screen shots of creating the

method sensor rules containing method arguments.

 

Thanks

Ashwin.

carlos
Inactive

Hi Ashwin,

It really depends on which technology you are using, for instance, Java or .Net? Or any idea on your application's tx flow?

Bests,
Carlos. 

anusha_kodimela
Organizer

 

Hi Carlos,

 

We are using JAVA technology.Currently our requiremnt is to capture all the user actions or visits based on the username.

We were able to capture based on location.Kindly suggest us how to get it in that particular location,the username as well.

 

Please find the screen shots below,

1.User Actions grouped by Visit.

2.Visits Grouped by Location.

As mention in the screen shot (Figure-1)Visit fromUnited Kingdom USA–We need to get it as visit from MR.XXX from USA.

 

 

 

Kindly Suggest

 

Thanks

Anusha.

 

 

srikar_mohan333
Inactive

Hello,

You will have to find out where in the application flow a 'user name' is passed...this can be in a cookie / session variable / method argument / etc...if you want to go the method sensor route then you will need to know which method passes the username as an argument / returns a username...then you can put a sensor on it and capture the value...for some reason if you are not able to find the exact method name, you can try taking a cpu sample for a minute and while the sample is running manually log in to your application.

The idea is to capture the call stack when you run a 'log in' transaction...you can then further analyze the call stack withing the cpu sample and find out a method that has a name which indicates an authentication process (perhaps called login / authenticate / etc)...as you can see this will be a trial and error...your best bet is to find out where the user name is passed.

With regards to the dtcookie, this is used to group all actions coming from a visit...you can see this by using fiddler / any of the developer tools within browsers...anyways from the new screenshot above it seems like the actions are getting grouped per visit so this doesnt seem to be an issue.

Hope this helps.

Srikar

carlos
Inactive

Hi,

Excellent, it is what I thought. And I'm glad now you can see different locations, was it after enabling the x-forward? Or was it a matter of location mappings?

So in a simple way, if you are lucky, authentication credentials = username could be retrieve from the "web server side" of the application (I do not know how your application is built), then you can set up Headers and Parameters as shown in the image (this is an IIS sample, but same process applies to other web servers). Or use cookie info and extract it from there.

With .Net is becomes really really simple to do.

I'd go for the Java option instead...

Java:

        a. Sometimes you can see the username from UserPrincipal, GetUSerPrincipal, SetUserName, etc... you can browse Classes and Methods and look for "user" (Ctrl+F recommended...), etc...and then create a measure for it. Just like Srikar described in the first reply, same process. 

        b. With that measure you can start getting the user name info (AD format, or LDAP format..depending on which technology they are using for authentication)

        c. You may need to define a regex expression, just to match what you are expecting as username and extract it.

        d. It may be required that you restart the application for the change to apply, after adding new methods/sensors. Since Hot Sensor Placement is prevented on Production environments, at least until dynaTrace 5.6, I'm still learning on 6.x

OR: If Development can provide the information of on which method they are using credentials, you can retrieve/see the user name from i.e. the Arguments column in the PurePath tree view, using the steps described by Srikar. This info is usually not available, at least on a timely fashion, so I like to research on my own... 😃

  1. If such method is NOT auto-instrumented, you need to create a sensor/measure for it, pick the method in the PP Tree, right click -> Add Sensor Rules -> Include Selected Methods. 
  2. Sometimes, you can't find a method with the username info, and you need to look for i.e. a Memory Sensor instead, and create a measure for it.

To my knowledge, there are no fixed rules or process to follow, it is just a matter of getting the right spot where credentials are used, create a measure, use that measure to Tag UEM visits, but be certain that can be done, it is worth the effort and results are amazing.

Here below is a sample finding username as described above, the Argument returns the user value as retrieved from LDAP auth and used by a web request.

 

anusha_kodimela
Organizer

 

Hi

We were unable to find which method is capturing the username,but we could find the details of the username in the query in the details tab of the purepath tree.Please find the attached screenshot below.

 

Can we group the visits or useractions by taking this username from the query in the details tab or is there any other way to group it using username?

Hi,

Now you only need to create a Split or Filter for that request, and retrieve whatever USERNAME= has.

Once there, with that split, you can TAG the visits and it will show up in your metrics. You are almost there.

Bests,
Carlos. 

anusha_kodimela
Organizer

 

One more question,by that details tab as a hit and trail method,i could find a method and included it in the sensors and created a measure with threshold 1 num and tagged the

 measure to the UEM.How can i check the result,directly in the UEM Visits or UEM UserActions dashboard?

Anusha,

You may see the username in the PurePath Tree, next to the method you found. First Step.

If it is there, the measure works, and now you can check under Visits, the username should be there right after the "Visit from" sentence.

Bests,
Carlos. 

anusha_kodimela
Organizer

Hi

As i told you earlier in my previous posts we were not able to see the username next to the method.

Please find the below settings of our dynaTrace confidential strings.

Any of the parameter has to be unchecked so that i can find the username under arguments in purepath tree??

anusha_kodimela
Organizer

 

Hi Team,

Could any one suggest on the above post?

carlos
Inactive

Hi Anusha,

I can see 3 posts above, that you have identified a web request for "*/loginpage*", an HTTP  GET that actually shows the Username=, if that is the username you are looking for, you can create a SPLIT an use it as a TAG for your visits.

 

Or you can browse method/classes within the JVM to find out the username string, however the web request in your screenshot seems to be easier.

Bests,
Carlos. 

anusha_kodimela
Organizer

 

Hi Carlos,

Can u please check the confidential string settings that i have posted above.Because we couldn't find any username details in the arguments column purepath.Any of the

confidential strings settings has to be changed(Any of the parameter has to be unchecked so that i can find the username under arguments in purepath tree)?

carlos
Inactive

Hi Anusha,

Yes, absolutely, please un.check the last three, Arguments, Return Values and Visits Tag.

anusha_kodimela
Organizer

Hi Andreas,

We have unchecked the confidential settings as shown in the below screenshot,

We could get the user id in the Database bind values of thedetails tab of a partcular webrequest,

 

kindly let me know how to create a measure so that we can capture the user id that is obtained in the details tab.(In this case 859104).

Please note that i have added a particular method which is capturing the user id and created a measure for it  and tagged it the UEM.But i couldn't find the user id in UEM Visits.Kindly let me know how can we acheive the requirement.

anusha_kodimela
Organizer

Hi,

Can anyone suggest?

Hi. There is unfortunately no Measure for Database Bind Values. That means - you cant use it for BTs or your Visit Tagging. You need to capture the User Id through a Method as you suggest. If you have already dont that you can create a Method Argument Meeasure and use this for your Visit Tagging. In order for this to work you also need to make sure that the PurePath that contains that method call is also linked to a User Action and with that to a Visit. Sometimes it can happen that not all Server-Side PurePaths are linked to a User Action, e.G: not supported JavaScript Framework or wrong UEM settings. In that case dynatrace UEM cant use that mesure for your visit tagging

Try the following: find the PurePath with the captured username from your method that you mentioned. then try to drill down to the User Action PurePath. If that doesnt work you know that your Server-Side PurePAths are not yet linked to your User Actions. In this case please check your UEM configuration and make sure you capture all user actions

Andi

anusha_kodimela
Organizer

Hi Andreas,

If Server-Side PurePaths are not yet linked to your User Actions,what are the UEM configuration settings which are to be made ?

In our dynaTrace set up,in the web server layer we have activated theUEM under  sensor placement  and sensor configuration.

andreas_grabner
Dynatrace Guru
Dynatrace Guru

Have you configured your UEM Settings in the System Profile? There are check boxes for the individual JavaScript frameworks we support such as jQuery, AngularJS, ... -> make sure you check those frameworks that your app is  using. There is also a "general" framework support called "Generic XHR" which will cover all other JAvaScript frameworks such as GWT

Andi

anusha_kodimela
Organizer

Hi Andreas,

Please find the screenshot attached for the UEM configurations in the system profile.

andreas_grabner
Dynatrace Guru
Dynatrace Guru

I would at least check the box next to "Basic XHR Detection" - I incorrectly named it "Generic XHR" in my pervious reply.

Also - ask your devs if you use jQuery, icefaces, ExtJS or Dojo. If so - check these boxes as well and try again

Andi

anusha_kodimela
Organizer

Hi Andreas,

One more doubth is that i could see the username only in the details tab (screenshot attached in above post) ,but not in the arguments tab in purepaths.

In the previous posts,Carlos has sent a screenshot where he could capture the username under arguments in purepaths.

we couldn't find why was it not getting captured in the arguments tab,

It depends on where you capture your username. If it is an argument for a method just as Carlos showed then it will show up in the Arguments column as it is "An ARgument" to a method. If you capture from your HTTP Parameters then it wont show up in the Arguments column as it is not a Method Argument. We only show the HTTP parameters in the details dialog.

BUT - if you also configure the Visitor Tagging feature as explained throughout this post then dynatrace will take the username from your HTTP PArameter and also show it as the name of the Visit in your Visits dashlet. It will then say: "Visit 'andi' from 10.x.x.x using IE". So - please check out the configuration of the Visit Tagging. Its been explained here in the post but you can also find information in the documentation. All it requires is a Measure that extracts your value and then you use this measure in the UEM Configuration section of your System Profile

Andi

Hi Andreas,

As per our understanding with dev team,The username is passed in a service method(servlet request request and servlet response response)

Hence i opened one of the loginPage purepath and added that particular method to method sensor rule,after that i have created a method-arguments measure

and tagged it the UEM in system profile.

I have checked in the Basic XHR Detectionas well.

Please find the screenshots below:

1.

2.

3.

4.

5.

I am not able to find the username,i was able to see visit from XXX place,United kindom,from XXX browser etc.

 

anusha_kodimela
Organizer

Hi Andreas,

Is the method followed for getting username was configured in a correct way??

I believe the method which captures the username should be identified correctly.

dave_mauney
Dynatrace Champion
Dynatrace Champion

I think the problem here is that you are creating a custom sensor for a method that is already instrumented out of the box, so your sensor will not work as only one sensor can exist per method.  Is there another method further along that is not instrumented where the user is passed?

When you are adding a custom sensor from a PurePath node, you should verify that the method you select has a Grey "M" icon that signifies it was collected with an auto sensor, which means it has no sensor already in effect.

HTH,

dave

anusha_kodimela
Organizer

Hi David Mauney,

The method service() which i have added is not having a grey "M" icon or a blue "M" icon either.

The more challenging part for us is identifying the method where user is passed,

Hi Anusha,

But it has an icon that indicates it is instrumented already (not a grey "M") so I think you will have to find another method.  Better yet though, why not just use the "USERNAME" request parameter since it apparently is part of the query string based on a much earlier comment you made?

Also, even if you were able to instrument the service method, the HttpServletRequest is a complex object that contains the String you want and is not a String itself, so you cannot convert it directly to a String to get your value.  Even worse, I think the accessor required to get a parameter from HttpServletRequest is more complex than we currently support with our deep object access capability.

I think using the "USERNAME" request parameter may be your best bet unless you can find another method that takes the user as a String argument.

HTH,

dave

anusha_kodimela
Organizer

Hi David,

Thanks for the response.

But how can i use "USERNAME" request parameter ?

I have tried to build a measure to extract the username from the details tab of a purepath,but it was not successful.

Can u please suggest.

anusha_kodimela
Organizer

Hi David,

As soon as the user is successfully logged in into a webpage(after entering credentials and his details are validated) i could find the username of the user from the referrer in the details tab.Please find the below screenshot.

Starting page-loginPage.xhtml (user enters credentials and clicks submit.)

After validation user lands into the following page-loginResolver.xhtml

Peviously i was able to track the username in the first page details tab under query itself,But now i was unable to find it.

Can u suggest any of the way to extract the username from the referrer as shown in the above screenshot.

 

dave_mauney
Dynatrace Champion
Dynatrace Champion

You could pull it from here and transform it with regex, but I would also check "Cookie" if you have not already.  If it is present in "Cookie" then use the following directions for capturing and transforming it.  If not in "Cookie" you can replace "Cookie" with "referer" in the directions:

1. Extract "Cookie" Request Parameter in Servlet Sensor properties
2. Navigate to first node of PP with web request that has "Cookie"
3. Right click on that first node and select "Create Measure" and select BT Request Header measure.  Be sure to pull "Cookie" and empty the URI and Query fields, etc.
4. Use Transformation Regex of "USERNAME=([^;]*)" for the cookie

Note:  use "USERNAME=([^&]*)" if you use referer.  Be sure to test the regex to make sure it pulls the value correctly.

HTH,

dave

anusha_kodimela
Organizer

Hi David,

Where do i need to check whether cookie was ready checked or not?

The BT name was Web Requests-Request Attribute Value(Servlet)?

It would be more helpful if you can share me the screenshots for the directions that you have mentioned above.

As i was not very clear on the first and third directions related to cookie.

Thanks and Regards,

Anusha