Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
fix(identity bug): change user name and user email (#64)
Browse files Browse the repository at this point in the history
* fix identity bug

* test fix
  • Loading branch information
sagivr2020 authored Oct 20, 2021
1 parent 3914307 commit a27dda7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class EpsagonUtils {
userId, userName, userEmail, companyId, companyName,
} = parentSpan.identifyFields;
if (userId) span.setAttribute('user.id', parentSpan.identifyFields.userId);
if (userName) span.setAttribute('user.name', parentSpan.identifyFields.name);
if (userEmail) span.setAttribute('user.email', parentSpan.identifyFields.email);
if (userName) span.setAttribute('user.name', parentSpan.identifyFields.userName);
if (userEmail) span.setAttribute('user.email', parentSpan.identifyFields.userEmail);
if (companyId) span.setAttribute('company.id', parentSpan.identifyFields.companyId);
if (companyName) span.setAttribute('company.name', parentSpan.identifyFields.companyName);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/web-tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ function identify(options) {
if (epsSpan) {
epsSpan.identifyFields = {
userId: options.userId,
name: options.name,
email: options.email,
userName: options.userName,
userEmail: options.userEmail,
companyId: options.companyId,
companyName: options.companyName,
};
Expand Down
4 changes: 2 additions & 2 deletions packages/web/test/web-tracer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ describe('tags tests', () => {
it('identify adds tags to epsSpan', (done) => {
const options = {
userId: 'test user',
name: 'test name',
email: 'test email',
userName: 'test name',
userEmail: 'test email',
companyId: 'company id test',
companyName: 'company name',
};
Expand Down

0 comments on commit a27dda7

Please sign in to comment.