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

Ability to mutate trace state for custom sampling #854

Closed
connectwithnara opened this issue Aug 21, 2020 · 1 comment
Closed

Ability to mutate trace state for custom sampling #854

connectwithnara opened this issue Aug 21, 2020 · 1 comment

Comments

@connectwithnara
Copy link

Use case:
In order to implement one or more custom sampling strategies. For example - control service participation in a trace. Imagine the following topology.

A -> B -> C -> D

  • Service A doesn't sample the incoming request however the trace context is initialized and sent downstream with sampling decision set to false.
  • Service B is configured to start a trace for all (100% sampling) the requests matching the path /foo. It encodes this sampling decision in the trace state so any downstream services can participate.
  • Service C doesn't do anything but propagates the context down.
  • Service D is configured to participate in the trace initiated by Service B. It looks up the trace state and makes a sampling decision to record the spans.

Basically the ask is to provide hooks/API changes to support such a use case. Specifically, in this example service B will need access to modify trace state where the sampling decision is taken. Service D will need access to the trace state to make a sampling decision.

@bogdandrutu @tedsuo @anuraaga

@bogdandrutu
Copy link
Member

Duplicate of #856, copied the example there.

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

No branches or pull requests

2 participants