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

Instead of holding implementations for each logging,tracing,metrics providers - establish interfaces. #238

Open
bwplotka opened this issue Oct 9, 2019 · 7 comments

Comments

@bwplotka
Copy link
Collaborator

bwplotka commented Oct 9, 2019

  • Instead of holding implementations for each logging, tracing, metrics providers, establish interfaces.
  • Be clear about it in docs
  • Store implementations in... nested go modules? Separate project? To agree.
@johanbrandhorst
Copy link
Collaborator

https://godoc.org/logur.dev/logur is interesting for a shared logging interface

@jpkrohling
Copy link
Contributor

Store implementations in... nested go modules? Separate project? To agree.

We could benefit from this in the OpenTelemetry Collector project: I would like to use the testing facilities (PingService), but depending on the main module brings opentracing-go with it, which is inconvenient for us.

See open-telemetry/opentelemetry-collector#4423 (comment)

@jpkrohling
Copy link
Contributor

Would it be acceptable if I submit a PR making the tracing/opentracing a standalone module? It could be seen as a starting point for this task.

@johanbrandhorst
Copy link
Collaborator

I think much of this work as been complete, right @bwplotka? I don't know if we want to commit to supporting our own tests as an external module though - feel free to copy them (if your license is compatible with ours, of course).

@jpkrohling
Copy link
Contributor

I found PingService very valuable in testing interceptors developed at our side. While we could copy it, I'd rather just use what you have here, as we would have to copy the protobufs, the Go files, and potentially setup the code generation utilities (which is honestly the part I'm trying to avoid).

@johanbrandhorst
Copy link
Collaborator

I appreciate the compliments, but this is not really part of the public API of this repository. We want to be able to make breaking changes to the test logic without breaking users. Maybe there is a space for a separate repository which does make this sort of testing easier?

Alternatively, do you really need all of that to test your interceptors? I've only ever just called the functions with faked inputs when writing interceptor tests.

@jpkrohling
Copy link
Contributor

In my case, I'm providing a facility that provides the interceptor for other components, so, I wanted to test whether my facility is indeed adding the interceptor. We have protobufs and unary services, but not streaming services, which PingService does. Given that we shouldn't be consuming, I'll go ahead and copy it into our repository. Thanks for the feedback!

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

3 participants