open-telemetry / oteps

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

A Sampling Configuration proposal #240

Open PeterF778 opened 8 months ago

PeterF778 commented 8 months ago

Presents a configuration model for describing built-in and third-party Samplers. This is written to support a class of future samplers, as described in the OTEP.

(description written by @jmacd)

mtwo commented 7 months ago

@carlosalberto @jack-berg can we mark this as triaged with priority p1?

PeterF778 commented 7 months ago

Thank you all for your questions, comments and sharing your ideas. I'll work on a modification of this proposal and introduce a possibility to declare a sampler. I hope this will improve:

and will bring the proposal one step further to become a true meta-sampler.

djaglowski commented 7 months ago

Can we clarify that this proposal is for sampling traces only? Similarly, should the proposed configuration structs be nested under a traces section?

PeterF778 commented 7 months ago

Can we clarify that this proposal is for sampling traces only? Similarly, should the proposed configuration structs be nested under a traces section?

Added the clarification. The proposal complements, but does not replace the file based configuration as defined by OTEP 225., so there's no need to specify traces.

jack-berg commented 7 months ago

@jmacd the goals of this should be compatible with what we're working on in the configuration group. Our working principle is to include all spec'd components as types in the configuration schema, but to ensure we support referencing / configuring custom extensions components, like samples, exporters, processors, propagators, metric readers, etc. This means that the schema directly specifies all the built-in samplers. In terms of configuring custom components, we're definitely still in the prototyping phase (here's a steel thread demo I've been using as a guiding use case in java) so we need to work out the details, but its a key feature we're committed to supporting.

IMO, a concrete task we can take out of this OTEP is for the sampling WG to work out the details of any required rule based samplers (I think I've also heard these called deterministic samplers) and add the definitions to the specification. After they're in the spec, the configuration SIG can add them to the schema.

jmacd commented 6 months ago

:tada: @PeterF778 this is looking great!