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

Support usage with explicit tracer #1

Closed
bogatuadrian opened this issue Oct 31, 2017 · 1 comment
Closed

Support usage with explicit tracer #1

bogatuadrian opened this issue Oct 31, 2017 · 1 comment

Comments

@bogatuadrian
Copy link

bogatuadrian commented Oct 31, 2017

Hi,

It would be nice to support an opentracing.Tracer given in constructor instead of using opentracing.StartSpanFromContext() which uses opentracing.GlobalTracer() underneath. This could be an optional feature controlled by an extra flag. I'd be happy to fork the project, add that functionality and make a PR if you would think something like that would be useful.

As an implementation detail, that tracer would be added as an extra field to the generated struct and be used when starting new spans.

Adrian

@hexdigest
Copy link
Contributor

Hi @bogatuadrian

Thanks for raising the issue and sorry for a bit delayed response :) Please check new New%sWithTracer constructor. No special flag is needed.

Also please check out generic decorators generator: https://github.com/hexdigest/gowrap

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

No branches or pull requests

2 participants