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

[Oneway Crossdock][Part 2] Add oneway context propagation test #520

Merged
merged 1 commit into from Dec 6, 2016

Conversation

peats-bond
Copy link
Contributor

Adds context propagation crossdock test for oneway transports.

The test:

  • client adds baggage to context
  • client calls server using the context
  • server calls the client back (using the same context)
  • client compares baggage

@mention-bot
Copy link

@AlexAPB, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bombela, @abhinav and @breerly to be potential reviewers.

yarpc.NewReqMeta().
Procedure("echo/raw").
Headers(yarpc.NewHeaders().
With("callBackAddr", callBackAddr)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Noice.

return opentracing.ContextWithSpan(context.Background(), span)
}

func extractBaggage(ctx context.Context) map[string]string {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a common need... @yurishkuro what do you think about putting something like this in OpenTracing or Jaeger?

Choose a reason for hiding this comment

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

Why do you need access to baggage explicitly as map[string]string? I.e. why not something like

func getBaggage(ctx Context, key string) {
   if span := opentracing.SpanFromContext(ctx); span != nil {
      return span.GetBaggageItem(key)
   }
}

?

@peats-bond peats-bond changed the base branch from oneway-crossdock to dev December 6, 2016 01:45
@peats-bond peats-bond merged commit 97c4b58 into dev Dec 6, 2016
@peats-bond peats-bond deleted the oneway-ctx-prop branch December 6, 2016 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants