Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Add Riemann event sink and bug fixes #1591

Merged

Conversation

mcorbin
Copy link
Contributor

@mcorbin mcorbin commented Apr 6, 2017

This PR supersedes 1339. Thanks @shmish111, your code helped me a lot.

  • Update riemann-go-client version
  • Add Riemann event sink
  • Moves code in common/riemann/riemann.go
  • Fix a bug on Riemann metrics sink for labeled metrics

cc @jamtur01 and @jsoriano for review

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 6, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @mcorbin. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mcorbin mcorbin force-pushed the feat/riemann-event-sink branch 2 times, most recently from fbb4618 to 191d7b4 Compare April 6, 2017 16:41
@jsoriano
Copy link
Contributor

jsoriano commented Apr 7, 2017

Reviewed 17 of 17 files at r1.
Review status: all files reviewed at latest revision, 4 unresolved discussions.


common/riemann/riemann.go, line 17 at r1 (raw file):

package riemann

import (

Please, organize imports in groups according to goimports (https://github.com/golang/go/wiki/CodeReviewComments#imports), and do the same in all edited files.


events/sinks/riemann/driver_test.go, line 134 at r1 (raw file):

		Timestamp: timestamp,
		Events: []*kube_api.Event{
			&event1,

Set these events here inline directly?


metrics/sinks/riemann/driver.go, line 27 at r1 (raw file):

// contains the riemann client, the riemann configuration, and a RWMutex
type RiemannSink struct {

Can we reuse the definition in common?


vendor/github.com/riemann/riemann-go-client/.gitignore, line 3 at r1 (raw file):

riemann.log
riemann-*
vendor

I don't think we want to ignore vendor directory.


Comments from Reviewable

- Update riemann-go-client version
- Add Riemann event sink
- Moves code in common/riemann/riemann.go
- Fix a bug on Riemann metrics sink for labeled metrics
@mcorbin
Copy link
Contributor Author

mcorbin commented Apr 7, 2017

Review status: 12 of 17 files reviewed at latest revision, 4 unresolved discussions.


common/riemann/riemann.go, line 17 at r1 (raw file):

Previously, jsoriano (Jaime Soriano Pastor) wrote…

Please, organize imports in groups according to goimports (https://github.com/golang/go/wiki/CodeReviewComments#imports), and do the same in all edited files.

Hi, i used goimports on all files. Thanks ;)


events/sinks/riemann/driver_test.go, line 134 at r1 (raw file):

Previously, jsoriano (Jaime Soriano Pastor) wrote…

Set these events here inline directly?

Done, thanks


metrics/sinks/riemann/driver.go, line 27 at r1 (raw file):

Previously, jsoriano (Jaime Soriano Pastor) wrote…

Can we reuse the definition in common?

I tried and failed. All sinks (influx, elasticsearch...) duplicates the sink struct in both events and metrics.


vendor/github.com/riemann/riemann-go-client/.gitignore, line 3 at r1 (raw file):

Previously, jsoriano (Jaime Soriano Pastor) wrote…

I don't think we want to ignore vendor directory.

I'm pretty new to Go, some projects consider pushing the vendor directory a bad practice, some projects dont. I don't really know what to do with the Riemann Go client.


Comments from Reviewable

@jsoriano
Copy link
Contributor

jsoriano commented Apr 9, 2017

Reviewed 5 of 5 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


vendor/github.com/riemann/riemann-go-client/.gitignore, line 3 at r1 (raw file):

Previously, mcorbin (Mathieu Corbin) wrote…

I'm pretty new to Go, some projects consider pushing the vendor directory a bad practice, some projects dont. I don't really know what to do with the Riemann Go client.

In heapster this directory is commited into the repository.


Comments from Reviewable

@mcorbin
Copy link
Contributor Author

mcorbin commented Apr 9, 2017

Review status: all files reviewed at latest revision, 1 unresolved discussion.


vendor/github.com/riemann/riemann-go-client/.gitignore, line 3 at r1 (raw file):

Previously, jsoriano (Jaime Soriano Pastor) wrote…

In heapster this directory is commited into the repository.

Yes, but here it's riemann-go-client vendor directory, so it should not impact Heapster (i can not find a Heapster dependency in vendor with it's own vendor directory). Furthermore, riemann-go-client depends only on protobuf.


Comments from Reviewable

@jsoriano
Copy link
Contributor

jsoriano commented Apr 9, 2017

Review status: all files reviewed at latest revision, 1 unresolved discussion.


vendor/github.com/riemann/riemann-go-client/.gitignore, line 3 at r1 (raw file):

Previously, mcorbin (Mathieu Corbin) wrote…

Yes, but here it's riemann-go-client vendor directory, so it should not impact Heapster (i can not find a Heapster dependency in vendor with it's own vendor directory). Furthermore, riemann-go-client depends only on protobuf.

Oh, you're right, my apologies, I was thinking it was the .gitignore of heapster repository.


Comments from Reviewable

@jsoriano
Copy link
Contributor

jsoriano commented Apr 9, 2017

:lgtm:


Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

Copy link
Contributor

@DirectXMan12 DirectXMan12 left a comment

Choose a reason for hiding this comment

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

LGTM at a glance.

@DirectXMan12
Copy link
Contributor

would like to see a review from @jamtur01 before merge, but if we don't get one soon, just ping me and I'll merge this.

@jamtur01
Copy link

@DirectXMan12 Apologies - didn't realize I was the blocker. This LGTM.

@DirectXMan12
Copy link
Contributor

Awesome. Merging!

@DirectXMan12 DirectXMan12 merged commit afb6bc2 into kubernetes-retired:master Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants