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 a span name getter to opencensus endpoint options #948

Merged
merged 8 commits into from Feb 17, 2020

Conversation

@sagikazarmark
Copy link
Contributor

@sagikazarmark sagikazarmark commented Jan 11, 2020

This is an experimental PR suggested by @basvanbeek in #946 (comment)

It adds a span name getter function to the opencensus endpoint tracer config.

Other options might worth adding:

  • StartOptions
  • GetStartOptions

See the opencensus ochttp plugin for more.

@sagikazarmark sagikazarmark requested a review from basvanbeek Jan 20, 2020
@sagikazarmark
Copy link
Contributor Author

@sagikazarmark sagikazarmark commented Jan 23, 2020

What are your thoughts about this? Is this what you had in mind?

@peterbourgon
Copy link
Member

@peterbourgon peterbourgon commented Jan 26, 2020

@sagikazarmark sagikazarmark force-pushed the sagikazarmark:opencensus-options branch from f972dce to e860742 Jan 31, 2020
@sagikazarmark
Copy link
Contributor Author

@sagikazarmark sagikazarmark commented Jan 31, 2020

@basvanbeek I've updated the PR based on your comments.

However, I feel it would be better to split the function into two:

  • GetSpanName
  • GetAttributes

More functions, more work, but they are more expressive IMHO.

@basvanbeek
Copy link
Member

@basvanbeek basvanbeek commented Jan 31, 2020

We can do the split... we can also say that if a returned name is empty on a call to GetName we keep the existing name for the endpoint. so you can drop the in parameter for name.

@sagikazarmark
Copy link
Contributor Author

@sagikazarmark sagikazarmark commented Jan 31, 2020

Updated the PR accordingly. If you have any ideas for better naming, let me know.

@sagikazarmark sagikazarmark force-pushed the sagikazarmark:opencensus-options branch from c999092 to b27801a Feb 1, 2020
Copy link
Member

@basvanbeek basvanbeek left a comment

Logic looks good to me with one nit as shown above. Also unsure of method naming. @peterbourgon any ideas?

@peterbourgon peterbourgon merged commit cc938d5 into go-kit:master Feb 17, 2020
4 checks passed
4 checks passed
builds.sr.ht: .build.yml builds.sr.ht job completed successfully
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 79.167%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.