Skip to content
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

Enhance gRPC server side async support. #741

Merged
merged 1 commit into from
Dec 27, 2024
Merged

Enhance gRPC server side async support. #741

merged 1 commit into from
Dec 27, 2024

Conversation

wu-sheng
Copy link
Member

Change context and parent entry span propagation mechanism from gRPC ThreadLocal context to SkyWalking native dynamic field as new propagation mechanism, to better support async scenarios.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

Ref apache/skywalking#12902 and original report apache/skywalking#12901

Change context and parent entry span propagation mechanism from gRPC ThreadLocal context to SkyWalking native dynamic field as new propagation mechanism, to better support async scenarios.
@wu-sheng wu-sheng added enhancement New feature or request plugin labels Dec 27, 2024
@wu-sheng wu-sheng added this to the 9.4.0 milestone Dec 27, 2024
@wu-sheng wu-sheng merged commit 1431cad into main Dec 27, 2024
192 checks passed
@wu-sheng wu-sheng deleted the grpc-server-async branch December 27, 2024 01:42
@@ -59,15 +56,17 @@ public <REQUEST, RESPONSE> ServerCall.Listener<REQUEST> interceptCall(ServerCall
ContextSnapshot contextSnapshot = ContextManager.capture();
AbstractSpan asyncSpan = span.prepareForAsync();

Context context = Context.current().withValues(CONTEXT_SNAPSHOT_KEY, contextSnapshot, ACTIVE_SPAN_KEY, asyncSpan);
//Context context = Context.current().withValues(CONTEXT_SNAPSHOT_KEY, contextSnapshot, ACTIVE_SPAN_KEY, asyncSpan);

ServerCall.Listener<REQUEST> listener = Contexts.interceptCall(

Choose a reason for hiding this comment

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

As no context values added, Context.interceptCall may be useless.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants