<br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 10:22 AM, Julien Danjou <span dir="ltr"><<a href="mailto:julien@danjou.info" target="_blank">julien@danjou.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Oct 25 2012, Doug Hellmann wrote:<br>
<br>
> That would be one way, but adding "dimensions" to the meters also makes<br>
> sense because it reduces the need to collect the data more than once.<br>
<br>
</div>In case of group, the other problem is how to emit instance counter with<br>
group metadata (assuming this group implementation is not part of Nova<br>
but Heat).<br></blockquote><div><br></div><div>Good point. I was assuming the values would be available as metadata of the underlying resource, but that may not always be the case.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
> For instance, if "flavor" was a dimension of the "instance" meter I<br>
> wouldn't need the separate meter "instance:<flavor>". These sorts of<br>
> use cases were part of the original motivation for collecting all of<br>
> the metadata about a resource, but what we have now isn't structured<br>
> enough to let the API user query into it.<br>
<br>
</div>IIUC, what's need here is a GROUP BY operator in the API.<br>
<br>
Correct me if I'm wrong, but this is still doable via the API if you<br>
request /users/<user>/meters/instance and treats the events in the<br>
client, no?<br></blockquote><div><br></div><div>It is possible, but very very inefficient.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> How, then, do we define the dimensions for a given meter in a more<br>
> structured way? Some built-in values (like flavor) can be pulled<br>
> automatically based on the resource type, but what about settings<br>
> controlled by the deployer and end-user (for purposes other than billing)?<br>
<br>
</div>Do we have to define dimensions explicitely, or isn't what's needed just<br>
ways to filter and/or group events by metadata fields?<br></blockquote><div><br></div><div>Querying against arbitrary metadata fields is easy in the MongoDB driver, but not in the SQLAlchemy driver. Adding explicit handling for dimensions would let us implement it in SQL and improve performance with indexes in Mongo.</div>
<div><br></div><div>Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Julien Danjou<br>
// Free Software hacker & freelance<br>
// <a href="http://julien.danjou.info" target="_blank">http://julien.danjou.info</a><br>
g<br>
</font></span></blockquote></div><br>