-
Notifications
You must be signed in to change notification settings - Fork 895
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 initial requirements for integration test #630
Conversation
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.
There needs to be a working prototype of this solution before it is added as a requirement to the spec.
|
||
Each language library should use the test harness as part of the CI (continuous integration). | ||
|
||
#### Test Harness |
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.
In OpenTracing we had a separate test harness framework that was operating purely at the API level. The implementation test had to provide certain introspection capabilities to the framework to validate the behavior (fairly limited since OT was not very prescriptive about the actual behavior). This was especially useful for dynamic languages.
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
|
||
### Integration Test | ||
|
||
The goal of integration test is to make sure: |
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.
The goal of integration test is to make sure: | |
The goal of the integration test is to make sure: |
(or plural?)
* The API package and SDK package are designed properly, so another SDK can be used to work with the API package. | ||
* The exporters are functional, and the emitted data meets expectations. | ||
* The context propagation is implemented correctly, so a distributed trace could be built among multiple services. | ||
* Sampling logic is implemented consistently across the services, and across the SDKs. |
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.
Across which services?
specification/library-guidelines.md
Outdated
* The context propagation is implemented correctly, so a distributed trace could be built among multiple services. | ||
* Sampling logic is implemented consistently across the services, and across the SDKs. | ||
|
||
A test harness is needed to verify each language library's integration and interoperability with other libraries and backends. |
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.
Which other libraries? Do you mean other OpenTelemetry implementations (API + default SDK) in other processes?
#### CI Requirement | ||
|
||
Each language library should implement a test service which interacts with the test harness. The test service should include: | ||
* A REST endpoint which is used to receive incoming requests from the harness and other services that are involved during the CI. |
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.
Please clarify what you mean with "other services that are involved during the CI". Currently it sounds like this was about CI services like CircleCI or AppVeyor.
I don't understand what is meant by like "using the C++ SDK" with the Python API. This sounds way too specific to Python because I don't see how that is something that would work in most languages -- assuming it works for the Python API? I was working on an API for a sort of integration tests by having tests run in parallel and compare results. So you'd run the tests against a Python instrumented project and against the C++ project to verify they give the same results. But it is on my other machine, I'll paste in what I was thinking of in a little bit. |
Still very rough, but really quick, my idea for integration tests so far looked like: syntax = "proto3";
import "opentelemetry/proto/common/v1/common.proto";
import "opentelemetry/proto/resource/v1/resource.proto";
import "opentelemetry/proto/trace/v1/trace.proto";
service EndToEndService {
rpc Export(EndToEndServiceRequest) returns (EndToEndServiceResponse) {}
}
message EndToEndServiceRequest {
repeated Step steps = 1;
}
message EndToEndServiceResponse {
}
message Step {
oneof step {
ForwardTo forward_to = 1;
SetAttributes set_attributes = 2;
AddEvents add_events = 3;
SetStatus set_status = 4;
}
}
message ForwardTo {
string host = 1;
uint32 port = 2;
repeated Step steps = 3;
}
message SetAttributes {
repeated opentelemetry.proto.common.v1.AttributeKeyValue attributes = 9;
}
message AddEvents {
repeated opentelemetry.proto.trace.v1.Span.Event events = 1;
}
message SetStatus {
opentelemetry.proto.trace.v1.Status status = 1;
}
Still a lot to add. Most importantly But I was having a set of workers that are configured to send out the steps to the starting points and a collector that'll just support OTLP and then verify what it receives from each. Meaning each node would configure an exporter to send to the e2e collector, or have the opentelemetry-collector receive them all and it forward to the e2e collector. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
Hey @reyang - went and applied the suggestions that seemed trivial. Do you think you will have time to iterate on the rest of the updates anytime soon? |
Given there were asks about the proof of concept, I think it makes sense to experiment it in one SDK and come back with some real examples. I will have the integration test in OpenTelemetry .NET and come back to this PR. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@reyang should this PR be reopened so it can be reviewed and brought in? This is on the list of desired items for otel ga. |
@andrewhsu I will reduce the scope and send a smaller PR in order to make progress. |
Added initial requirements for integration test.
Removed
OpenCensus
exporter requirement (I guess it is no longer required?).