Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Multidimensional check is not always correct #141

Open
mheffner opened this issue Aug 21, 2018 · 0 comments
Open

Multidimensional check is not always correct #141

mheffner opened this issue Aug 21, 2018 · 0 comments
Labels

Comments

@mheffner
Copy link
Contributor

Take the following code:

measure_time = (Time.now.tv_sec / 300) * 300

Librato::Metrics.authenticate 'token', opts[:appoptics_token]
queue = Librato::Metrics::Queue.new(:prefix => "foo",
                                    :time => measure_time)
  queue.add "mymetric": {
    value: 1.34,
    tags: {"foo" => "bar"}
  }

This leads to a payload that includes a top-level :measure_time => <> key which is not valid for multidimensional (and fails to submit). This appears to be because we use a has_tags? check on the Queue, however the queue could legitimately not have any tags because they are added on the individual measurements. Therefore, it seems like the check must be performed on the individual measurements and not on the queue itself.

@mheffner mheffner added the bug label Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant