-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Decouple API from SDK #977
Conversation
Benchmark the kv package not the SDK here.
Move SDK related tests to SDK where applicable
To be used by the API for testing so it does not depend on the actual SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That had to be tiresome! Thank you.
This will make testing API changes so much easier, not to have a cyclic dependency on the SDK.
I assume after this we'll add a separate go.mod for api? |
Sort of. The idea is to add a |
Ah, got it. I'd prefer that we go ahead and do that work before we cut another minor release version |
// Create an http.Client that uses the othttp.Transport | ||
// wrapped around the http.DefaultTransport | ||
client := http.Client{ | ||
_ = http.Client{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a very useful example anymore, perhaps it would be best to simply delete it or move it into a README.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be included in the godocs and I think it is a decent example of how to use it for a new users:
Additionally, with it actually existing as Go code it is validated with the compiler resulting in valid code. This is something I noticed was not true in some other places where we tried to keep code in docs (1, 2, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, I'm not super tied to this example if we want to remove or expand it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that does remain a decent example. Out of context it looks off, but I'm not against keeping it.
global
package. When it makes sense (the metric SDK move the benchmark to the SDK).kv
package. Instead test overhead of the package functions directly.api/trace/testtrace
package instead of the SDK in theglobal/internal/trace_test.go
tests.api/trace/testtrace
package to include aProvider
and extensible functionality in how it records spans.