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

Commit a27dda7

Browse files
authored
fix(identity bug): change user name and user email (#64)
* fix identity bug * test fix
1 parent 3914307 commit a27dda7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/web/src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ class EpsagonUtils {
55
userId, userName, userEmail, companyId, companyName,
66
} = parentSpan.identifyFields;
77
if (userId) span.setAttribute('user.id', parentSpan.identifyFields.userId);
8-
if (userName) span.setAttribute('user.name', parentSpan.identifyFields.name);
9-
if (userEmail) span.setAttribute('user.email', parentSpan.identifyFields.email);
8+
if (userName) span.setAttribute('user.name', parentSpan.identifyFields.userName);
9+
if (userEmail) span.setAttribute('user.email', parentSpan.identifyFields.userEmail);
1010
if (companyId) span.setAttribute('company.id', parentSpan.identifyFields.companyId);
1111
if (companyName) span.setAttribute('company.name', parentSpan.identifyFields.companyName);
1212
}

packages/web/src/web-tracer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ function identify(options) {
6363
if (epsSpan) {
6464
epsSpan.identifyFields = {
6565
userId: options.userId,
66-
name: options.name,
67-
email: options.email,
66+
userName: options.userName,
67+
userEmail: options.userEmail,
6868
companyId: options.companyId,
6969
companyName: options.companyName,
7070
};

packages/web/test/web-tracer.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ describe('tags tests', () => {
107107
it('identify adds tags to epsSpan', (done) => {
108108
const options = {
109109
userId: 'test user',
110-
name: 'test name',
111-
email: 'test email',
110+
userName: 'test name',
111+
userEmail: 'test email',
112112
companyId: 'company id test',
113113
companyName: 'company name',
114114
};

0 commit comments

Comments
 (0)