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

Inconsistency between _type and type #8

Closed
knzconnor opened this issue Dec 28, 2011 · 11 comments
Closed

Inconsistency between _type and type #8

knzconnor opened this issue Dec 28, 2011 · 11 comments

Comments

@knzconnor
Copy link

it seems some places expect _type, and others type, as the key for the event type?

@asmuth
Copy link
Owner

asmuth commented Dec 28, 2011

Mh, it's supposed to be "_type" everywhere. Where did you see "type"? :)

@knzconnor
Copy link
Author

app.rb

@knzconnor
Copy link
Author

I can't get events to show up right everywhere unless I give them both a _type and a type

@asmuth
Copy link
Owner

asmuth commented Dec 28, 2011

That's strange. Can you maybe paste your server-file and how you are submitting the events? :)

the "/:namespace/events"-action in app.rb renders the left column of the "Active Users" dashboard, so it's not involved in the event-processing.

@knzconnor
Copy link
Author

If I only use _type I end up getting blank event types in the ActiveUsers widget.

on every event like { _type: 'unicorn_seen' }

event(:unicorn_seen) do
# increment the unicorns_seen gauge by 1
incr :unicorns_seen
end

numeric (delta) gauge, 1-hour tick

gauge :unicorns_seen,
:title => "Unicorns seen"

draw a timeline showing the gauges value, auto-refresh every 30s

widget 'Unicorns', {
:title => "Unicorn-Sightings",
:type => :numbers,
:gauges => :unicorns_seen,
:include_current => true,
:autoupdate => 60
}

@asmuth
Copy link
Owner

asmuth commented Dec 28, 2011

How are you submitting the events? I tried the config from above with this curl line:

curl -X POST -d "_type=unicorn_seen" http://localhost:4242/events

Is it possible that you submitted some events with a missing _type field earlier? In that case you could flush your redis-db (or just ignore it).

@knzconnor
Copy link
Author

Using the raw netcat example from the docs - I also have been flushing my redis pretty regularly while testing this out.

On Wednesday, December 28, 2011 at 12:15 PM, Paul Asmuth wrote:

How are you submitting the events? I tried the config from above with this curl line:

curl -X POST -d "_type=unicorn_seen" http://localhost:4242/events

Is it possible that you submitted some events with a missing _type field earlier? In that case you could flush your redis-db (or just ignore it).


Reply to this email directly or view it on GitHub:
#8 (comment)

@asmuth
Copy link
Owner

asmuth commented Dec 28, 2011

Can you get a blank type in the typelist just by submitting the netcat line from the readme? The only way I could get it was when I removed the leading underscore from "_type". However, I made a change, so the blank item won't show up anymore.

@knzconnor
Copy link
Author

Kill the blank row helps a bit. There seems to be some oddities with getting the first few results to show up when I submit an event with only a _type, but I haven't narrowed anything else down enough to give you much to work with. Thanks for the responsiveness!

On Wednesday, December 28, 2011 at 12:27 PM, Paul Asmuth wrote:

Can you get a blank type in the typelist just by submitting the netcat line from the readme? The only way I could get it was when I removed the leading underscore from "_type". However, I made a change, so the blank item won't show up anymore.


Reply to this email directly or view it on GitHub:
#8 (comment)

@asmuth
Copy link
Owner

asmuth commented Dec 28, 2011

Mh, maybe it's only the very first event, that is not showing up? The "feed view" in the "Active Users" Dashboard is always one event behind...

@knzconnor
Copy link
Author

it might just be the one behind issue complicating debugging

asmuth pushed a commit that referenced this issue Nov 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants