Transaction.SetUser not working properly when populating username


(Ci Song) #1

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


(Felix Barnsteiner) #2

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


(Ci Song) #3

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


(Ci Song) #4

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


(Felix Barnsteiner) #5

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


(system) #6

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