-
Hi folks, I'd like to ask a question regarding sampling rate, and whether or not setting it across microservices can result in inconsistent trace. HypothesisWe believe that when a downstream service defines its own BackgroundConsider the following architecture: flowchart LR
g[Gateway] --> a[Authn/Authz]
g[Gateway] --> u[User]
g[Gateway] --> t[Transaction]
For each services, we would have a wrapper on top of func initializeTracer(rate float64) {
var samplingRate = 1.0
if rate != 0 {
samplingRate = rate
}
tracer.Start(
// Agent address and other service-specific tags have been omitted for clarity.
// ...
tracer.WithSamplingRules([]tracer.SamplingRule{
tracer.RateRule(samplingRate),
}),
tracer.WithAnalytics(true),
tracer.WithAnalyticsRate(samplingRate),
// ...
)
} Which basically means that each service can define their own sampling rate, and when it's not, it defaults to 1.0 ScenarioGiven
ExpectedWhen a Gateway trace get's dropped, User trace and all subsequent trace should get dropped. Actual
QuestionIs this behavior intended? Is the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@paleboot Thanks for the detailed message. You are right, it wasn't an intended behaviour and we already fixed it in #3856, which is going to be released as part of |
Beta Was this translation helpful? Give feedback.
@paleboot Thanks for the detailed message. You are right, it wasn't an intended behaviour and we already fixed it in #3856, which is going to be released as part of
v2.2.3
(also available asv1.74.6
) next week.