Closed chancefeick closed 7 years ago
client = Librato::Metrics::Client.new(tags: { region: "us-east-1" })
queue = Librato::Metrics::Queue.new(client: client)
queue.add_tags hostname: "metrics-web-stg-2"
Two questions about this:
you are thinking to support cascading tag sets including at the client level?
Yes, tag management (add, remove) is currently handled by the Client
.
is #add_tags equivalent to adding tags in the constructor of Queue just for later use?
#add_tags
is delegated to the Queue's client instance, which would then be applied to all measurements.
After second thought, makes sense to remove tag management from Client entirely and allow Queue and Aggregator to handle it instead.
After second thought, makes sense to remove tag management from Client entirely and allow Queue and Aggregator to handle it instead.
Yeah, :+1: this, I think you'll definitely run into race issues otherwise.
@nextmat addressed feedback, PTAL
LGTM
@chancefeick @nextmat are we going to include README changes which explain the new API (similar to the PR description) as well as documenting the fact that this will continue to work with /v1/metrics
and is not making the library "tags only" etc?
@jderrett it was suggested offline to update README after GA to avoid any confusion. will update in a separate PR that custom success can point beta users to
Going to release as 2.1.0.beta
.
Add support for
/v1/measurements
endpoint to retrieve and submit tagged measurements.Tagged measurements contain tags, which are a set of name=value tag pairs that describe the particular data stream. Tags are equivalent to source in the previous data model.
Retrieving
Retrieving tagged metric series:
#get_series
Submitting
There are multiple ways to submit and manage tags for measurements on
Queue
andAggregator
. Here are a few examples:Initialization
Arguments
README and code documentation will be updated in a separate PR.