Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add new 'type' and 'encryption' labels to weave_connections metric #3789

Merged
merged 4 commits into from
Aug 3, 2020
Merged

Add new 'type' and 'encryption' labels to weave_connections metric #3789

merged 4 commits into from
Aug 3, 2020

Conversation

hairyhenderson
Copy link
Contributor

Fixes #3788

Notes:

  • I don't have a good way of testing this out locally, but make succeeds, so that's encouraging...
  • instead of limiting the state label's value to the values in allConnectionStates, the state will reflect whatever's in conn.State (which may be out of sync with allConnectionStates some day? 🤷‍♂)
  • I felt like maybe logging some sort of error message if the value of the name attribute was a non-string, but not sure if this is really necessary. Maybe removing the check and allowing a panic instead would be better somehow?

Signed-off-by: Dave Henderson dhenderson@gmail.com

prog/weaver/metrics.go Outdated Show resolved Hide resolved
@bboreham
Copy link
Contributor

Hi, if you're not finding time to come back to this I'll pick it up.

@hairyhenderson
Copy link
Contributor Author

@bboreham thanks - I had this on my ever-growing TODO list, but simply haven't gotten back to it yet... if you're able to handle this that would be much appreciated! 😅

@bboreham bboreham added this to the 2.7 milestone Jul 29, 2020
hairyhenderson and others added 4 commits July 30, 2020 10:24
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
We know all the expected states, so can pre-create maps
Extend tests to check it shows up.
Tests assume that metrics are published with metrics in alphabetical
order, which appears to be the case for now.
@bboreham
Copy link
Contributor

I added the test, and also the branch needed rebasing so I did that, and then added an encryption label.
See the result at master...add-connection-type-label-to-weave-connection-metric-3788

@hairyhenderson I can try to push that to your branch if you like, or I can merge from my branch.
Either way please take a look and see if you spot any flaws.

@hairyhenderson
Copy link
Contributor Author

@bboreham thanks! (and sorry again for the slow response time)

Your changes LGTM, and please feel free to push to this branch - I've enabled the Allow edits by maintainers so you should be able to add a commit without issue.

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke-tests won't run when the branch is pushed from a 3rd-party repo, but they did complete at the same commit here:
https://circleci.com/gh/weaveworks/weave/tree/add-connection-type-label-to-weave-connection-metric-3788

@bboreham bboreham changed the title Add new 'type' label to weave_connections metric Add new 'type' and #encryption' labels to weave_connections metric Aug 3, 2020
@bboreham bboreham changed the title Add new 'type' and #encryption' labels to weave_connections metric Add new 'type' and 'encryption' labels to weave_connections metric Aug 3, 2020
@bboreham bboreham merged commit 4592758 into weaveworks:master Aug 3, 2020
@hairyhenderson hairyhenderson deleted the add-connection-type-label-to-weave-connection-metric-3788 branch August 3, 2020 14:04
@hairyhenderson
Copy link
Contributor Author

Thanks so much @bboreham - and sorry again for dropping the ball on this one 😅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

weave_flows metric is fastdp-only, no way to see how many sleeve flows there are
2 participants