Transaction.SetUser not working properly when populating username

Hi,
I am using Elastic APM Java agent api. When I am calling transaction.setUser(userId, userEmail, userName) in my method, userId and email are properly showing in kibana. However, username is always shown as N/A and I am pretty sure it is a valid username string when calling the setUser method.

Here's the code:

void function(userId, userName, email) {
Transaction transaction = ElasticApm.currentTransaction();
transaction.setUser(userId, email, userName);
}

Any ideas why username is not populated ?

Thank you

Hi and thanks for reporting this!

This was indeed a bug sneaking in. I've fixed it in https://github.com/elastic/apm-agent-java/pull/106.

Keep the feedback coming :slight_smile:

Thanks,
Felix

Hi Felix:
Thanks for the fix ! When will the fix be released ? We are blocked by this issue.

Hi Felix:
Thanks for the fix ! When will the fix be released ? We are blocked by this issue.

It will be released soon.
Can you build the agent from source in the meantime?

Clone the repo and execute
./mvnw clean package -DskipTests=true

The agent jar is in the folder elastic-apm-agent/target

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.