@@ -559,6 +559,26 @@ The SDK SHOULD provide a way to allow `MetricReader` to respond to
559
559
idiomatic approach, for example, as ` OnForceFlush ` and ` OnShutdown ` callback
560
560
functions.
561
561
562
+ The SDK SHOULD provide a way to allow [ Aggregation
563
+ Temporality] ( ./datamodel.md#temporality ) to be specified for a ` MetricReader `
564
+ instance during the creation time. [ OpenTelemetry SDK] ( ../overview.md#sdk )
565
+ authors MAY choose the best idiomatic design for their language:
566
+
567
+ * Whether to treat the temporality settings as recommendation or enforcement.
568
+ For example, if the temporality is set to Delta, would the SDK want to perform
569
+ Cumulative->Delta conversion for an [ Asynchronous
570
+ Counter] ( ./api.md#asynchronous-counter ) , or downgrade it to a
571
+ [ Gauge] ( ./datamodel.md#gauge ) , or keep consuming it as Cumulative due to the
572
+ consideration of [ memory
573
+ efficiency] ( ./supplementary-guidelines.md#memory-management ) ?
574
+ * If an invalid combination of settings occurred (e.g. if a ` MetricReader `
575
+ instance is set to use Cumulative, and it has an associated [ Push Metric
576
+ Exporter] ( #push-metric-exporter ) instance which has the temporality set to
577
+ Delta), would the SDK want to fail fast or use some fallback logic?
578
+ * Refer to the [ supplementary
579
+ guidelines] ( ./supplementary-guidelines.md#aggregation-temporality ) , which have
580
+ more context and suggestions.
581
+
562
582
### MetricReader operations
563
583
564
584
#### Collect
@@ -629,6 +649,29 @@ example:
629
649
* Exporter D is a pull exporter which reacts to another scraper over a named
630
650
pipe.
631
651
652
+ The SDK SHOULD provide a way to allow [ Aggregation
653
+ Temporality] ( ./datamodel.md#temporality ) to be specified for a ` MetricExporter `
654
+ instance during the creation time, if the exporter supports both Cumulative and
655
+ Delta [ Temporality] ( ./datamodel.md#temporality ) . [ OpenTelemetry
656
+ SDK] ( ../overview.md#sdk ) authors MAY choose the best idiomatic design for their
657
+ language:
658
+
659
+ * Whether to treat the temporality settings as recommendation or enforcement.
660
+ For example, if an [ OTLP Exporter] ( ./sdk_exporters/otlp.md ) instance is being
661
+ used, and the temporality is set to Delta, would the SDK want to perform
662
+ Cumulative->Delta conversion for an [ Asynchronous
663
+ Counter] ( ./api.md#asynchronous-counter ) , or downgrade it to a
664
+ [ Gauge] ( ./datamodel.md#gauge ) , or keep exporting it as Cumulative due to the
665
+ consideration of [ memory
666
+ efficiency] ( ./supplementary-guidelines.md#memory-management ) ?
667
+ * If an invalid combination of settings occurred (e.g. if a [ Prometheus
668
+ Exporter] ( ./sdk_exporters/prometheus.md ) instance is being used, and the
669
+ temporality is set to Delta), would the SDK want to fail fast or use some
670
+ fallback logic?
671
+ * Refer to the [ supplementary
672
+ guidelines] ( ./supplementary-guidelines.md#aggregation-temporality ) , which have
673
+ more context and suggestions.
674
+
632
675
### Push Metric Exporter
633
676
634
677
Push Metric Exporter sends the data on its own schedule. Here are some examples:
0 commit comments