Skip to content

Migrate tracingTest helper from Zipkin to OpenTelemetry#8913

Open
brucearctor wants to merge 1 commit intoknative:mainfrom
brucearctor:otel-tracing-test-helper
Open

Migrate tracingTest helper from Zipkin to OpenTelemetry#8913
brucearctor wants to merge 1 commit intoknative:mainfrom
brucearctor:otel-tracing-test-helper

Conversation

@brucearctor
Copy link

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: Introduced SpanData struct as a lightweight OTel span representation, replacing model.SpanModel. Updated SpanMatcher to use oteltrace.SpanKind and GetTraceTree to use oteltrace.SpanID for 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: Restored tracingTest function with event store setup, infrastructure creation, event assertion, and trace ID extraction via OTel propagation. Restored getTraceIDHeader (which already used OTel's propagation.TraceContext).
  • test/conformance/helpers/broker_tracing_test_helper.go: Replaced model.Server/model.Client with oteltrace.SpanKindServer/oteltrace.SpanKindClient.
  • test/conformance/helpers/channel_tracing_test_helper.go: Same as broker helper.
  • test/conformance/broker_tracing_test.go and channel_tracing_test.go: Updated t.Skip messages.

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 remain t.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

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
@knative-prow knative-prow bot requested review from evankanderson and mgencur March 14, 2026 02:13
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 14, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: brucearctor / name: brucearctor (67729db)

@knative-prow knative-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 14, 2026
@knative-prow
Copy link

knative-prow bot commented Mar 14, 2026

Welcome @brucearctor! It looks like this is your first PR to knative/eventing 🎉

@knative-prow
Copy link

knative-prow bot commented Mar 14, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 14, 2026
@knative-prow
Copy link

knative-prow bot commented Mar 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: brucearctor
Once this PR has been reviewed and has the lgtm label, please assign upodroid for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the area/test-and-release Test infrastructure, tests or release label Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test-and-release Test infrastructure, tests or release needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tracingTest helper needs to be redone with OTel

1 participant