Skip to content

Conversation

@natemort
Copy link
Member

@natemort natemort commented Dec 18, 2025

While workflows still capture the tracing information in the headers, we should pass the Tracer to TChannel so that we correctly trace all RPC requests sent to the Cadence server.

Ensure that Tracer can't be set to null and correct the testing library version to avoid classpath conflicts.

What changed?

  • Pass Tracer to TChannel
  • Change default Tracer to GlobalTracer, which defaults to NoopTracer

Why?

  • Ensure full tracing support
  • Enable tracing by default if the runtime environment has a default Tracer.

How did you test it?

  • Unit and integration tests

Potential risks

  • Cadence creates redundant spans as part of its own tracing implementation. These are somewhat incorrect, but it would take significant work to remove. This is true for the go-client as well.
  • Cadence's gRPC implementation doesn't have an immediate equivalent to this and requires users to pass a ManagedChannel that already has an equivalent interceptor. Users migrating from TChannel to gRPC may see a regression if they similarly allow Cadence to construct the transport.

Release notes

Documentation Changes

Copy link
Contributor

@abhishekj720 abhishekj720 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM with a minor comment about explanation of reason of downgrading opentracing-mock

testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testCompile group: 'io.grpc', name: 'grpc-testing', version: '1.54.2'
testImplementation 'io.opentracing:opentracing-mock:0.33.0'
testImplementation 'io.opentracing:opentracing-mock:0.32.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why opentracing-mock is pinned to 0.32.0 (what conflict it avoids)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TChannel version we're using at runtime uses the opentracing 0.32.0 core libraries. This test dependency ends up overwriting that, making our tests run against opentracing 0.33.0 core.

There was a breaking change in opentracing, so the tests all fail after the Tracer is added because the method they call no longer exists.

This change corrects the test version to match what we actually run against. It's a test dependency of the java client, so it doesn't impact users at all.

While workflows still capture the tracing information in the headers, we should pass the Tracer to TChannel so that we correctly trace all RPC requests sent to the Cadence server.

Ensure that Tracer can't be set to null and correct the testing library version to avoid classpath conflicts.
@natemort natemort merged commit c8e6015 into cadence-workflow:v3.13.x Dec 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants