@@ -13,8 +13,8 @@ become unreliable, making it eventually obsolete.
1313
1414This information can be effectively derived in the backend using the
1515` Resource ` of the parent ` Span ` , but is otherwise not available
16- at Collector processing time, where it could be used for sampling
17- and tranformation purposes .
16+ at Collector processing time, where it could be used for transformation
17+ purposes or sampling (e.g. adaptive sampling based on the calling service) .
1818
1919As metrics and logs do not have defined a parent-child relationship, using
2020` peer.service ` could help gaining insight into the remote service as well.
@@ -83,6 +83,20 @@ With `peer.service` present in server spans, further processing, filtering and s
8383then be accomplished in the Collector, e.g. a preview of the dependency map of a service,
8484similar in spirit to zPages could be created.
8585
86+ ### Sampling scenarios
87+
88+ A specially interesting case is sampling depending on the calling service, specifically:
89+
90+ * An adaptive sampler may decide to sample or not based on the calling service, e.g.
91+ given Service A amounting to 98% of requests, and Service B amounting to 2% only,
92+ more traces could be sampled for the latter.
93+ * In cases where a parent ` Span ` is ** not** sampled ** but** its child (or linked-to ` Span ` )
94+ wants to sample, knowing the calling service ** may** help with the sampling decision.
95+ * In deployment scenarios where context is properly propagated through all the services,
96+ but not all of them are actually traced, it would be helpful to know what services
97+ were part of the request, even if no traces/spans exist for them, see
98+ https://github.com/w3c/trace-context/issues/550 as an example.
99+
86100## Trade-offs and mitigations
87101
88102Given the ` TraceState ` [ lenght contrains] ( https://www.w3.org/TR/trace-context/#tracestate-header )
0 commit comments