-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add weavenet metrics to billing #2504
Conversation
The build for this is going to fail until the vendor-ed code is updated to contain weaveworks/billing-client#5 |
app/multitenant/billing_emitter.go
Outdated
hasNet := false | ||
for _, n := range r.Overlay.Nodes { | ||
overlayType, _ := report.ParseOverlayNodeID(n.ID) | ||
if overlayType == report.WeaveOverlayPeerPrefix { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Gotcha. Please ping me once the vendored code is updated |
Yeah can do! I'd heard the go convention was to have one exit point, but
perhaps that's more of a concern in longer functions.
…On Mon, 8 May 2017, 17:56 Matthias Radestock, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In app/multitenant/billing_emitter.go
<#2504 (comment)>:
> @@ -112,6 +118,20 @@ func (e *BillingEmitter) reportInterval(r report.Report) time.Duration {
return d
}
+// Tries to determine if this report came from a host running Weave Net
+func hasWeaveNet(r report.Report) bool {
+ hasNet := false
+ for _, n := range r.Overlay.Nodes {
+ overlayType, _ := report.ParseOverlayNodeID(n.ID)
+ if overlayType == report.WeaveOverlayPeerPrefix {
you might as well get rid of hasNet and return true instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2504 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADMks5BwUcVEwnMCg7e3pTFd1m8h0f_ks5r30k9gaJpZM4NT3LQ>
.
|
Really? Where did you read this? I'd say quite the opposite. |
I think it was something I read ages ago; I may have imagined it. I'll simplify :) |
@2opremio I've updated billing-client |
This is intended to give some insights into adoption among weave cloud users