ApplicationInsightsSampler Class
Sampler that implements the same probability sampling algorithm as the ApplicationInsights SDKs.
- Inheritance
-
opentelemetry.sdk.trace.sampling.SamplerApplicationInsightsSampler
Constructor
ApplicationInsightsSampler(sampling_ratio: float = 1.0)
Parameters
Name | Description |
---|---|
sampling_ratio
|
default value: 1.0
|
Methods
get_description | |
should_sample |
get_description
get_description() -> str
should_sample
should_sample(parent_context: Context | None, trace_id: int, name: str, kind: SpanKind | None = None, attributes: Mapping[str, str | bool | int | float | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float]] | None = None, links: Sequence[Link] | None = None, trace_state: TraceState | None = None) -> SamplingResult
Parameters
Name | Description |
---|---|
parent_context
Required
|
|
trace_id
Required
|
|
name
Required
|
|
kind
|
default value: None
|
attributes
|
default value: None
|
links
|
default value: None
|
trace_state
|
default value: None
|
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for