Migrate tracingTest helper from Zipkin to OpenTelemetry#8913
Migrate tracingTest helper from Zipkin to OpenTelemetry#8913brucearctor wants to merge 1 commit intoknative:mainfrom
Conversation
Replace all Zipkin model types (model.SpanModel, model.Kind, model.ID, model.Endpoint) with OpenTelemetry equivalents in the conformance tracing test infrastructure. Changes: - Introduce SpanData struct as lightweight OTel span representation - Update SpanMatcher to use oteltrace.SpanKind instead of model.Kind - Update GetTraceTree to use oteltrace.SpanID for parent-child linking - Restore tracingTest function with event assertion and trace ID extraction - Restore getTraceIDHeader (already used OTel propagation) - Update broker and channel tracing test helpers to use OTel span kinds - Update conformance test skip messages The actual OTel trace retrieval from a running cluster is left as a TODO since it requires deploying an OTel Collector as test infrastructure. The conformance tests remain skipped until that infrastructure is in place. Fixes: knative#8853
|
|
|
Welcome @brucearctor! It looks like this is your first PR to knative/eventing 🎉 |
|
Hi @brucearctor. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: brucearctor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Description
Addresses #8853. Migrates the conformance tracing test infrastructure from Zipkin (
github.com/openzipkin/zipkin-go/model) to OpenTelemetry (go.opentelemetry.io/otel/trace).What changed
test/conformance/helpers/tracing/traces.go: IntroducedSpanDatastruct as a lightweight OTel span representation, replacingmodel.SpanModel. UpdatedSpanMatcherto useoteltrace.SpanKindandGetTraceTreeto useoteltrace.SpanIDfor parent-child linking.test/conformance/helpers/tracing/traces_test.go: Updated all test cases to use OTel types. All 8 subtests pass.test/conformance/helpers/tracing_test_helper.go: RestoredtracingTestfunction with event store setup, infrastructure creation, event assertion, and trace ID extraction via OTel propagation. RestoredgetTraceIDHeader(which already used OTel'spropagation.TraceContext).test/conformance/helpers/broker_tracing_test_helper.go: Replacedmodel.Server/model.Clientwithoteltrace.SpanKindServer/oteltrace.SpanKindClient.test/conformance/helpers/channel_tracing_test_helper.go: Same as broker helper.test/conformance/broker_tracing_test.goandchannel_tracing_test.go: Updatedt.Skipmessages.What is NOT included
The actual OTel trace retrieval from a running cluster (querying an OTel Collector) is left as a TODO in
tracingTest, since it requires deploying an OTel Collector as test infrastructure. The conformance tests remaint.Skip-ed until that infrastructure is in place. This can be addressed in a follow-up issue.Verification
go build ./test/conformance/helpers/...✅go vet ./test/conformance/helpers/...✅go test ./test/conformance/helpers/tracing/...✅ (8/8 subtests pass)Fixes #8853