open-telemetry / oteps

OpenTelemetry Enhancement Proposals
https://opentelemetry.io
Apache License 2.0
337 stars 164 forks source link

Proposal: Remote Sampling #191

Open bhautikpip opened 2 years ago

bhautikpip commented 2 years ago

Introduction

Remote Sampling is a sampling technique in which sampling configuration for a path/request can be applied in a distributed way. For example, if there are 5 hosts in the fleet and user has set sampling reservoir as 5 req/sec and the fixed rate as 5% then remote sampling helps to distribute sampling configs to all the hosts in a way ultimately SDK samples 5 request/sec and additional 5% of requests after that.

This document talks about X-Ray Centralized Sampling and how to implement it using Sampling Interface for OTel SDKs.

The proposal here would be to standardized remote sampling data model/protocol required by SDK side implementation. Obviously to implement such sampling approach backend would also have to compute quota and feed data in to the SDK for sampling decision.