worried-analyst-4239
01/05/2023, 10:40 PMworried-analyst-4239
01/05/2023, 10:40 PMrudder_analytics_sync gem)
event = { user_id: 111, event: 'event_name', time: 1672277135000, properties: {...}}
RudderAnalytics.track(event)
What I see via Rudderstack Live Events
{
"body": {
"XML": {},
"FORM": {},
"JSON": {
"events": [
{
"ip": "redacted",
"time": 1672957502039,
"library": "rudderstack",
"user_id": 111,
"insert_id": "redacted",
"event_type": "event_name",
"session_id": -1,
"user_properties": {},
"event_properties": {
...,
}
}
],
"api_key": "redacted",
"options": {
"min_id_length": 1
}
},
"JSON_ARRAY": {}
},
"type": "REST",
"files": {},
"method": "POST",
"params": {},
"userId": "",
"headers": {
"Content-Type": "application/json"
},
"version": "1",
"endpoint": "https://api2.amplitude.com/2/httpapi"
}worried-analyst-4239
01/05/2023, 11:17 PMtimestamp param, but that hasn’t worked eitherworried-analyst-4239
01/05/2023, 11:27 PMtimestamp on the incoming event from the source (via the source Live Events) is correct.
{
"context": {
"library": {
"name": "rudder-sdk-ruby-sync",
"version": "1.0.7"
},
"traits": {}
},
"event": "event name",
"integrations": {
"All": true
},
"messageId": "redacted",
"properties": {
...
},
"rudderId": "redacted",
"sentAt": "2023-01-05T23:25:16.430Z",
"timestamp": "2022-12-29T01:25:35.000+00:00",
"type": "track",
"userId": 111
}worried-analyst-4239
01/06/2023, 12:24 AMtimestamp is used from the incoming event to set the time field on the outgoing message here.
That function looks up mappings stored here. The problem I see with this mapping is that the originalTimestamp which is used first cannot be sent via the ruby sdk and according to docs used to calculated timestamp if it is not manually specified. So it seems that the order here
"timestamp": ["originalTimestamp", "timestamp"],
should be flipped.calm-yak-10773
01/06/2023, 4:07 AMTransformations feature enables you to write custom JavaScript functions to implement specific use-cases on your event dataBy using transformation you can convert the parameter
timestamp to originalTimestamp in the payload. This would solve your issue.bright-afternoon-44693
01/09/2023, 1:10 PMbright-afternoon-44693
01/09/2023, 1:11 PM