You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
In the long run we kind-of wanted to move to using SD metric protos
throughout the Nozzle, for consistency. Since then OpenCensus has turned up
and it's approximately the "blessed" way of getting metrics into
Stackdriver, so instead it might well be worth looking into that as a
replacement for all this proto-creation code.
I suspect there are no tests because all this code does is assemble proto
structs from a Metric struct. These are going to end up being
change-detector tests, IMO: every time anything in this package changes the
tests will need to be rewritten too. They won't add much value because
there's no complex logic to test. Perhaps the only behavioural test would
be for "Flatten" ...
Some of the metric functions look a little interesting.
https://github.com/cloudfoundry-community/stackdriver-tools/blob/master/src/stackdriver-nozzle/messages/metric.go#L55
metric.go has no tests. It should have some.
metric.go: might be better to have a mapping from envelope type to stackdriver metrics type.
https://github.com/cloudfoundry-community/stackdriver-tools/blob/master/src/stackdriver-nozzle/nozzle/unit_parser.go
Maybe there is a library which could do part of this?
The text was updated successfully, but these errors were encountered: