-
Notifications
You must be signed in to change notification settings - Fork 375
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
Fix tracer runnable mdc clean #536
Conversation
WalkthroughThe updates across multiple Changes
Sequence Diagram(s)sequenceDiagram
participant Thread
participant TraceContext
participant SpanExtensionFactory
Thread->>TraceContext: Check current thread ID
alt Thread ID matches
TraceContext->>Thread: Continue processing
else Thread ID does not match
TraceContext->>Thread: Pop current span
TraceContext->>SpanExtensionFactory: Log stopped span
end
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (27)
- pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-datasource-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-dubbo-2.6.x-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-dubbo-common-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-dubbo-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-flexible-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-httpclient-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-kafkamq-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-mongodb-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-okhttp-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-rabbitmq-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-redis-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-resttmplate-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-rocketmq-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-spring-cloud-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-springmessage-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-springmvc-plugin/pom.xml (1 hunks)
- sofa-tracer-plugins/sofa-tracer-zipkin-plugin/pom.xml (1 hunks)
- tracer-all/pom.xml (1 hunks)
- tracer-core/pom.xml (1 hunks)
- tracer-core/src/main/java/com/alipay/common/tracer/core/async/FunctionalAsyncSupport.java (1 hunks)
- tracer-extensions/pom.xml (1 hunks)
- tracer-sofa-boot-starter/pom.xml (1 hunks)
- tracer-test/core-test/pom.xml (1 hunks)
- tracer-test/log4j-test/pom.xml (1 hunks)
- tracer-test/log4j2-test/pom.xml (1 hunks)
- tracer-test/logback-test/pom.xml (1 hunks)
Files skipped from review due to trivial changes (24)
- pom.xml
- sofa-tracer-plugins/sofa-tracer-datasource-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-dubbo-2.6.x-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-dubbo-common-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-dubbo-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-flexible-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-httpclient-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-kafkamq-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-mongodb-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-rabbitmq-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-redis-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-resttmplate-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-rocketmq-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-spring-cloud-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-springmessage-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-springmvc-plugin/pom.xml
- sofa-tracer-plugins/sofa-tracer-zipkin-plugin/pom.xml
- tracer-all/pom.xml
- tracer-core/pom.xml
- tracer-extensions/pom.xml
- tracer-sofa-boot-starter/pom.xml
- tracer-test/log4j-test/pom.xml
- tracer-test/log4j2-test/pom.xml
- tracer-test/logback-test/pom.xml
Additional comments not posted (3)
tracer-core/src/main/java/com/alipay/common/tracer/core/async/FunctionalAsyncSupport.java (1)
53-54
: LGTM!The addition of logging for the stopped span enhances traceability and debugging capabilities.
The code changes are approved.
sofa-tracer-plugins/sofa-tracer-okhttp-plugin/pom.xml (1)
8-8
: Version update approved.The version of the parent artifact has been incremented from
3.1.6
to3.1.7
, indicating potential enhancements or bug fixes in the parent project.The code changes are approved.
tracer-test/core-test/pom.xml (1)
7-7
: Version update approved.The version of the parent artifact has been incremented from
3.1.6
to3.1.7
, indicating potential enhancements or bug fixes in the parent project.The code changes are approved.
Motivation:
SofaTracerRunnable do not clean up the MDC upon exit, causing an MDC leakage.
Modification:
Clean up MDC context upon exit
Summary by CodeRabbit
3.1.7
, indicating potential new features and improvements.