Skip to content
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 GCP Cloud PubSub reporter #159

Conversation

KeisukeYamashita
Copy link

@KeisukeYamashita KeisukeYamashita commented Nov 26, 2019

What

Why

@coveralls
Copy link

coveralls commented Nov 26, 2019

Coverage Status

Coverage increased (+2.4%) to 67.92% when pulling 89d56c9 on KeisukeYamashita:add-gcp-pubsub-exporter into d761b19 on openzipkin:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.9%) to 60.568% when pulling 386fed9 on KeisukeYamashita:add-gcp-pubsub-exporter into d761b19 on openzipkin:master.

@KeisukeYamashita
Copy link
Author

I will use stubReporter. Working on in now.

reporter/gcppubsub/pubsub_test.go Outdated Show resolved Hide resolved
reporter/gcppubsub/pubsub_test.go Outdated Show resolved Hide resolved
@KeisukeYamashita
Copy link
Author

I introduce stubReporter and stubClient.
In the previous #142, the pubsub topic will be nil and the test will always pass.

@@ -1,25 +1,31 @@
module github.com/openzipkin/zipkin-go

require (
Copy link
Contributor

Choose a reason for hiding this comment

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

I see many dependencies being added, did you try go mod tidy?

var resultMsg = make(chan reporterResult)

// Reporter implements Reporter by publishing spans to a GCP gcppubsub.
type Reporter struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious about this being exported. Can't this be private?


const defaultPubSubTopic = "defaultTopic"

var resultMsg = make(chan reporterResult)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, why this is not part of the struct that entirely uses it? Also, could we rename it into resultMsgC otherwise it is the easiest to understand what happens in line 104.

@jcchavezs
Copy link
Contributor

Any feedback @basvanbeek ?

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

Successfully merging this pull request may close these issues.

None yet

6 participants