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

batch sending of multiple values with timestamping enabled #20

Merged
merged 1 commit into from
Apr 1, 2016

Conversation

tverlaan
Copy link
Contributor

@tverlaan tverlaan commented Apr 1, 2016

Not sure if the title is clear enough, but I'll try to explain in more detail.

If both timestamping and batch_window_size is enabled (respectively true and something greater than zero) I get an error on no case clause matching

14:18:36.504 [error] CRASH REPORT Process exometer_report_influxdb with 0 neighbours crashed with reason: no case clause matching {[erlang,memory],#{<<"host">> => "timmov-mbp.local"},#{total => 50843616},1459513116503950} in exometer_report_influxdb:maybe_send/5 line 261

This happens when you define a metric as:

{ [:erlang, :memory], {:function, :erlang, :memory, [], :proplist, [:processes, :total]}, [] }]

And a subscription as:

{:exometer_report_influxdb, [:erlang, :memory], [:total, :processes], 5000, true, []}

This patch resets the timestamp so that for [:erlang, :memory] the timestamp is taken from the latest in the list (one of these: [:total, :processes]).

The result of this patch is this (ngrep):

erlang_memory,host=timmov-mbp.local processes=8878072i,total=51101328i 1459514976146610

Which I think is mentioned in #14 (comment)

Please let me know if this is acceptable.

@surik surik merged commit 072bbfb into travelping:master Apr 1, 2016
@surik
Copy link
Contributor

surik commented Apr 1, 2016

Thank you!

@tverlaan tverlaan deleted the timestamping-and-batch-sending branch April 1, 2016 13:25
@tverlaan
Copy link
Contributor Author

tverlaan commented Apr 1, 2016

Wow, that was quick! Thanks!

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

Successfully merging this pull request may close these issues.

2 participants