cloudfoundry-community / stackdriver-tools

Stackdriver Nozzle for Cloud Foundry Loggregator, Host Monitoring Agents BOSH Release
Apache License 2.0
21 stars 13 forks source link

Prepend event origin to all generated metric names. #139

Closed fluffle closed 6 years ago

fluffle commented 6 years ago

Pivotal's docs use the origin to differentiate between metrics that have the same name, explicitly prepending it to the metric name. The DataDog nozzle does the same thing. Consistency with these is valuable, though this does introduce a change in metric naming that is not backwards-compatible.

Example name changes, first the "now matches the docs, but whatever":

Then the "wow, disambiguation is helpful!":

Then the "maybe we don't want to do this, ugh":

The last one is different because numGoRoutines means the same thing across multiple origins. Using a label to differentiate instead here is probably the right thing to do, but conditionally appending the origin requires more complexity to enumerate where that condition holds.


This change is Reviewable

johnsonj commented 6 years ago

LGTM

Great. The disambiguation is critical. In the numGoRoutines example I don't even think it's very useful to look at that metric across the multiple pieces of software. tps_listener might be written in a way that it's expected to use tons of goroutines and tcp_emitter isn't suppose to use any.

We shouldn't get the nozzle too far into the business of massaging metrics.


Reviewed 2 of 2 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable