question

Alejandro H. avatar image
Alejandro H. asked ·

Mobile User Tagging

I've inplemented the Mobile monitoring of an Android App with command line Auto instrumentation and the client wants to identify the user with the user tagging, however I've never done that before and I need some advice. So far I know that I have to use the OneAgent SDK for mobile and I read in the documentation that I can add it by adding it to the dependencies with the next instruction:

dependencies {
implementation 'com.dynatrace.agent:agent-android:<version>'

}

and that I can do the tag with the instruction:

Dynatrace.identifyUser(<usertag>);

However is it not clear for me how to do the tag could you help me please?

Also I have inplemented the mobile monitoring with manual Instrumentation (developer) for IOS can you also tell me how to do the user tagging for IOS please.

Dynatrace Managedmobile monitoringuser tagging
1 comment
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

@Patrick H. Can you help me with this?

0 Likes 0 · ·
Suresh K. avatar image
Suresh K. answered ·

Hi,

From where we should call this API Dynatrace.identifyUser("john.doe@example.com"); Is it possible to do this from GUI.

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

You call it when you know which user a session should be tagged with (e.g. after login finished or after app was started and you already know which user is logged in). It has te be set on every app restart as the user tag is not persisted.
I don't understand the GUI part of this question... but you can call it from everywhere

0 Likes 0 · ·
Thomas W. avatar image
Thomas W. answered ·

You have to add the OneAgent library as dependency to your project (in the file build.gradle) with

dependencies {
	implementation 'com.dynatrace.agent:agent-android:<version>'
}

, where version must be the equal to the version of the auto-instrumentor. The OneAgent library is now hosted on JCenter and MavenCentral, which allows you to easily upgrade the version. But in this case we recommend to use the Dynatrace Gradle plugin, because it automatically ensures that the version of the agent and auto-instrumentor are equal.

5 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Yeah I already know that, what is not clear for me is how to apply the tag.

0 Likes 0 · ·

The tag is applied by using the API Dynatrace.identifyUser(<usertag>); where <usertag> is e.g. the users email address or a user id which you want to tag the session of a user.

1 Like 1 · ·

@Patrick, where should the API be called/configured in the app in order to tag the session with the username?
Should the dev add that API call right after the login code, for example?
Only calling the API in one point of the APP will already tag the entire session successfully?

0 Likes 0 · ·

Different Patrick, but I can still help ;)

Calling identifyUser will tag the entire session. The earlier the tagging is done, the earlier the tag will be available for live session. Doing it after the login would be fine. But it also is no problem if you do it later on, as long as the point where you call the API is always executed for every user.

2 Likes 2 · ·

Great! Thank you, Patrick!

0 Likes 0 · ·

Space Topics

mobile monitoring dotnet synthetic monitoring reports iis chat kubernetes servicenow amazon web services mysql mainframe rest api errors cassandra dashboard oneagent sdk cmc application monitoring openkit smartscape request attributes monitoring developer community user tagging log monitoring services ufo syntheticadvisory activegate ip addresses auto-detection high five award oracle hyperion webserver uem usql iib test automation license web performance monitoring ios news migration management zones index ibm mq web services custom event alerts notifications sso host monitoring knowledge sharing reports browser monitors java hybris sap vmware maintenance window user action naming javascript appmon ai synthetic classic availability tipstricks automation extensions session replay diagnostic tools permissions davis assistant faq documentation problem detection http monitors server easytravel apdex aws-quickstart network docker tags and metadata cloud foundry google cloud platform synthetic monitoring process groups account usability dynatrace saas gui paas openshift key user actions administration user actions postgresql synthetic locations oneagent security Dynatrace Managed user management custom python technologies mongodb openstack user session monitoring continuous delivery citrix configuration alerting NGINX action naming linux nam installation masking error reporting database mission control jmeter recorder apache mobileapp RUM php threshold azure purepath davis scripting agent aix nodejs android