Java method parameter as User Tag

Hello!

I want to add a user tag to an application. The user tag would be a request attribute which is a java parameter. Here is my problem.

I capture a string which is look like this:

loginId=shortname, mail=name.short@mailserver.com, givenName=Short, name=userID, sn=Name, department=DepartmentName

I want the user tag looks like this: “Name Short (loginID)”

I guess I should use a regex expression but I don’t know what.

Is it possible to do this way or is there any other way?

Currently, it is not possible to concatenate multiple server-side request attribute to form a User Tag.

I’d recommend using the Dtrum JavaScript API, because it provides with more flexibility for those custom user tag use cases.

https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#identifyUser

You’d need to call the identifyUser() method in your frontend to send your custom user tag into the platform.

Hope it helps!