We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a89965 commit b131bbfCopy full SHA for b131bbf
platform-includes/performance/traces-sampler-as-sampler/python.mdx
@@ -4,6 +4,13 @@ def traces_sampler(sampling_context):
4
# along with anything in the global namespace to compute the sample rate
5
# or sampling decision for this transaction
6
7
+ # Use the parent sampling decision if we have an incoming trace.
8
+ # Note: we strongly recommend respecting the parent sampling decision,
9
+ # as this ensures your traces will be complete!
10
+ parent_sampling_decision = sampling_context.get("parent_sampled")
11
+ if parent_sampling_decision is not None:
12
+ return float(parent_sampling_decision)
13
+
14
if "...":
15
# These are important - take a big sample
16
return 0.5
0 commit comments