-
Notifications
You must be signed in to change notification settings - Fork 28
Stop Generating MessageId #55
Conversation
@@ -12,7 +12,6 @@ var integration = require('@segment/analytics.js-integration'); | |||
var json = require('json3'); | |||
var keys = require('@ndhoule/keys'); | |||
var localstorage = require('yields-store'); | |||
var md5 = require('spark-md5').hash; | |||
var protocol = require('@segment/protocol'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need the uuid dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok 👍
Code LGTM! I think we should update the version of a.js core as a dev here and add a test to verify it picks the messageId from whatever a.js provides. One more thing we can consider to reduce risk is to leave the generation logic as is, but make it check the root message first.
|
@@ -425,6 +410,13 @@ describe('Segment.io', function() { | |||
assert(!object._metadata); | |||
}); | |||
}); | |||
|
|||
it('should pick up messageId from AJS', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@f2prateek Is this along the lines of what you were looking for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
(looks like some lint errors were flagged in CI, let's get those fixed before merging too) |
Accompanies segmentio/analytics.js-core#106