Decision: Should we recommend allowing users to set Readers directly? #3244
Labels
area:metrics
Part of OpenTelemetry Metrics
pkg:SDK
Related to an SDK package
question
Further information is requested
Pull exporters (like Prometheus) are expected to use a manual reader under the hood. Users may also want to set the Aggregation of metrics on the reader. In that case, we have two options (discussion. @MadVikingGod and I discussed this offline, and decided to open an issue to discuss further):
Similarly, push exporters are expected to use a periodic reader. Push exporters can allow users to configure aspects of the reader (e.g. interval) in one of two ways:
In both push and pull, exporters have to choose between being able to offer safety (by preventing users from setting WithAggregationTemporality) with the cost of the duplicated config surface. In the push case in particular, I suspect setting a correct default temporality is important for exporters which don't want the existing default temporality. This also will have an impact on new options that may be added to metric.Readers over time (e.g. WithBridge, which i'm interested in).
A third option in both cases would be for push/pull exporters to add a more generic WithReaderOptions(Manual/PeriodicReaderOption...), and then override the Aggregation temporality option. There may be more options than that.
The text was updated successfully, but these errors were encountered: