Skip to content

Feature request: Client-Side sampling or similar mechanism to avoid throttling for traces #2105

@slavaschmidt

Description

@slavaschmidt

Use case

Context

We are currently evaluating AWS Powertools as a potential replacement for our custom X-Ray trace publisher. Our existing solution is tailored for high-throughput batch processing workloads, where we frequently encounter throttling issues with AWS X-Ray during peak load periods.

Use Case

In our current setup, we mitigate X-Ray throttling by implementing a custom sampling mechanism using SQS. This allows us to decouple trace generation from trace submission and apply post-processing sampling logic before sending data to X-Ray.
However, AWS Powertools does not currently offer a way to configure or intercept trace processing in a way that would allow us to implement similar throttling mitigation strategies.

Solution/User Experience

We would greatly benefit from a mechanism in Powertools that allows more control over how traces are handled before being sent to X-Ray. Two possible approaches could include:

  • Configurable Sampling Logic: Allow users to define custom sampling strategies (e.g., probabilistic, rate-based, or dynamic sampling).
  • Pluggable Trace Destination: Provide an option to redirect trace data to a custom destination (e.g., SQS, Kinesis, or a local buffer) for deferred or filtered submission.

We are open to any other solution that would enable similar flexibility in managing trace throughput under high-load conditions.

Thank you for considering this enhancement!

Alternative solutions

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Ideas

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions