Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must specify a non-null, non-empty event #41

Open
danielross opened this issue Jan 29, 2015 · 3 comments
Open

Must specify a non-null, non-empty event #41

danielross opened this issue Jan 29, 2015 · 3 comments

Comments

@danielross
Copy link

In KeenClient.java the validateEvent throws an error if the event is null or empty.

If I have set some global properties and want to simply add an event to my collection without adding any extra attributes. How am I supposed to do that?

Thanks

@joshed-io
Copy link

Thanks for opening the issue @danielross. Sounds like a bug to me, you should be able to send an event with just the global properties. @Geeber what do you think?

@Geeber
Copy link
Contributor

Geeber commented Feb 1, 2015

Yep I think it's a bug. @smurthas think you can add this as something to get fixed in the 3.0 release?

We could also consider doing a quick patch in the 2.1.x line. I think all it would take is changing line 1150 of KeenClient.java from

if (event == null || event.size() == 0) {

to

if (event == null) {

That would allow empty events. I guess we would probably also want to add something to the end of validateAndBuildEvent, after the global properties have been inserted, to check if the resulting map is still empty. I do think it probably makes sense to treat an empty event as an error if there are no global properties; would you agree @danielross?

@danielross
Copy link
Author

Thanks for the response.
I think I would agree that a 'completely empty' event should be treated as an error.
It depends really on whether allowing people to send events without properties, which are basically just counters, is of sufficient value to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants