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 bdee2f9 commit 381c41fCopy full SHA for 381c41f
opentelemetry-api/src/opentelemetry/trace/sampling.py
@@ -83,10 +83,11 @@ def __init__(self, rate: float):
83
# The sampler checks the 8 high-order bytes of the trace ID to decide
84
# whether to sample a given trace.
85
CHECK_HIGH_BITS = 64
86
+ TRACE_ID_LIMIT = 2 ** CHECK_HIGH_BITS # type: int
87
88
@classmethod
89
def get_bound_for_rate(cls, rate: float) -> int:
- return round(rate * 2 ** cls.CHECK_HIGH_BITS)
90
+ return round(rate * cls.TRACE_ID_LIMIT)
91
92
@property
93
def rate(self) -> float:
0 commit comments