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

Testsuite for other implementations of API #1490

Closed
kenfinnigan opened this issue Jul 31, 2020 · 14 comments
Closed

Testsuite for other implementations of API #1490

kenfinnigan opened this issue Jul 31, 2020 · 14 comments
Labels
Feature Request Suggest an idea for this project release:after-ga

Comments

@kenfinnigan
Copy link
Member

Though OpenTelemetry provides an implementation of the API with its SDK, it would be great if there was a TCK style of test suite that could be used to verify non OpenTelemetry implementations of the API to ensure some level of compatibility and compliance.

Has anything like this been discussed?

@kenfinnigan kenfinnigan added the Feature Request Suggest an idea for this project label Jul 31, 2020
@carlosalberto
Copy link
Contributor

Hey @kenfinnigan

It was, but long time ago ;) I agree that having such TCK layer would of of great help. In OpenTracing Python we had this one, and it was pretty, pretty useful.

Probably this is something that should actually land in the Specification, as I can imagine this being done for all the supported languages ;)

@anuraaga
Copy link
Contributor

/cc @awssandra We're working on some cross-language integration tests for the SDKs, is there anything we can help with here?

@kenfinnigan
Copy link
Member Author

That's a good point @carlosalberto, should an issue be opened in the specification?

@jkwatson
Copy link
Contributor

jkwatson commented Aug 3, 2020

Is there even enough of a specification of what a non-default SDK MUST do at this point to make this valuable? IIRC, we've been focussing on describing the default SDK's behavior, rather than any arbitrary SDK's behavior.

@Oberon00
Copy link
Member

Oberon00 commented Aug 4, 2020

Is there even enough of a specification of what a non-default SDK MUST do at this point

I would think so. The API spec is clearly separated from the SDK spec and any non-default SDK must also fulfill the API spec.

@jkwatson
Copy link
Contributor

jkwatson commented Aug 4, 2020

So, what does it mean to "fulfill" the API spec? The observable outputs of the SDK are 100% dependent on what the SDK decides to do with API calls, and I don't think that behavior is necessarily well defined. Can you give an example of something that could be tested this way today?

@kenfinnigan
Copy link
Member Author

If there is behavior within the SDK that defines what is output, is that defined in the spec?

If there's no expectation about anyone every implementing the API outside the SDK, and thus the API is purely a public API documentation piece, could that be documented somewhere if it isn't already?

@jkwatson
Copy link
Contributor

jkwatson commented Aug 4, 2020

I believe that the intent is that alternative API implementations are possible, but I don't believe that the spec says anything, at this point, about how those alternatives should behave, or what their outputs SHOULD (or MUST) be.

@carlosalberto
Copy link
Contributor

For reference, this is what we had in OT Python - as you can see, the things we had there were basic overall, but you get an idea of the (very) minimum requirements.

Other than that, having a set of requirements for the output becomes trickier, and would require way more work - for example, there could be a harness layer that creates N-Spans with a few attributes/events/links, and check the output of a supported backend, such as Zipkin or Jaeger.

@iNikem
Copy link
Contributor

iNikem commented Aug 4, 2020

Other than that, having a set of requirements for the output becomes trickier, and would require way more work - for example, there could be a harness layer that creates N-Spans with a few attributes/events/links, and check the output of a supported backend, such as Zipkin or Jaeger.

Hmmm, looks like open-telemetry/opentelemetry-java-instrumentation#298 (comment)

@jkwatson
Copy link
Contributor

jkwatson commented Aug 4, 2020

Other than that, having a set of requirements for the output becomes trickier, and would require way more work - for example, there could be a harness layer that creates N-Spans with a few attributes/events/links, and check the output of a supported backend, such as Zipkin or Jaeger.

Hmmm, looks like open-telemetry/opentelemetry-java-instrumentation#298 (comment)

But that's just exercising the default SDK, not any arbitrary SDK, right? So, I think my concern stands...I just don't know what we can say about arbitrary SDKs...maybe one would have no discernible output, aside from some S3 bucket somewhere, for example.

@iNikem
Copy link
Contributor

iNikem commented Aug 5, 2020

The same test harness can be used to exercise any SDK and verify that Collector got and understood all the data. E.g. I am going to use the same harness for testing Splunk agent as well.

@Oberon00
Copy link
Member

Oberon00 commented Aug 5, 2020

I don't think being able to talk to the collector can be a generic requirement for any SDK. The no-op implementation is the minimal SDK implementation. Any really generic test suite would be a subset of the no-op testsuite.

@jkwatson
Copy link
Contributor

I'm going to close this, as I still don't think it's possible to specify any outputs for an arbitrary non-standard SDK implementation of the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project release:after-ga
Projects
None yet
Development

No branches or pull requests

6 participants