amplitude / Amplitude-Node

Server-side Node.js SDK for Amplitude
MIT License
67 stars 20 forks source link

Events logged are not appearing in amplitude #59

Closed jkumaranc closed 3 years ago

jkumaranc commented 3 years ago

Summary

Hi there,

When I call the log event function from this module, I get the 200 response. But the number of 'eventsIngested' returns 0. And I am not able to see the events in the dashboard either.

{ status: 'success', statusCode: 200, body: { eventsIngested: 0, payloadSizeBytes: 58, serverUploadTime: 1605483387446 } }

The event was as simple as just this {event_type: 'test'}

What would be the issue? Appreciate your help guys. Thanks.

jkumaranc commented 3 years ago

Figured out I had to either add device_id or user_id in the event. Closing the issue.

kelvin-lu commented 3 years ago

@jkumaranc Thanks for creating this issue - I created a short PR to make this easier to debug.

There was an assumption made in one layer of the node client that threw away events without both ids. Now this should appear in debug logs and also return a response with status 'skipped' to make it more obvious what is happening.

Apologies for the confusion!