1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-14 10:13:10 +02:00
opentelemetry-go/sdk/metric
Tyler Yahn 308d0362e6
Only registers callbacks if non-drop aggregation is used (#3408)
* Do not return an error for Drop aggs

The async instruments currently return an error if and only if there are
no aggregators returned from a resolve. Returning no aggregators means
the instrument aggregation is drop. Do not include this in the error
reporting decision.

* Only registers callbacks if non-drop agg is used

The instruments passed to RegisterCallback need to have some aggregation
defined otherwise it is implied they have a Drop aggregation. Check that
at least one instrument passed has an aggregation other than Drop before
registering the callback with the pipelines.

Also, return an error if the user passed another API implementation of
an asynchronous instrument.

* Remove unneeded TODO from pipeline

* Add changes to changelog

* Test callback not called for all drop instruments

* Test RegisterCallback returns err for non-SDK inst

* Fail gracefully for non-SDK instruments

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-11-11 09:10:59 -08:00
..
aggregation Recommend not recording cumulative explicit histogram min/max (#3403) 2022-10-31 18:59:05 -07:00
internal Do not export aggregations without any data points (#3436) 2022-11-11 07:22:27 -08:00
metricdata Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
view Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
benchmark_test.go New benchmark derived from otel-launcher-go (#3395) 2022-11-01 08:50:49 -07:00
cache_test.go Handle duplicate Aggregators and log instrument conflicts (#3251) 2022-10-11 15:41:47 -04:00
cache.go Handle duplicate Aggregators and log instrument conflicts (#3251) 2022-10-11 15:41:47 -04:00
config_test.go Associate views with MeterProvider instead of Reader (#3387) 2022-10-31 07:55:54 -07:00
config.go Associate views with MeterProvider instead of Reader (#3387) 2022-10-31 07:55:54 -07:00
doc.go Merge metric SDK development branch "new_sdk/main" into "main" (#3175) 2022-09-15 18:41:24 -07:00
example_test.go Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
exporter.go Move Aggregation/Temporality selection to the Exporter interface (#3260) 2022-11-01 07:56:18 -07:00
go.mod dependabot updates Mon Oct 31 15:24:02 UTC 2022 (#3433) 2022-10-31 08:54:41 -07:00
go.sum dependabot updates Mon Oct 31 15:24:02 UTC 2022 (#3433) 2022-10-31 08:54:41 -07:00
instrument_provider.go Only registers callbacks if non-drop aggregation is used (#3408) 2022-11-11 09:10:59 -08:00
instrument.go Handle duplicate Aggregators and log instrument conflicts (#3251) 2022-10-11 15:41:47 -04:00
manual_reader_test.go Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
manual_reader.go Move Aggregation/Temporality selection to the Exporter interface (#3260) 2022-11-01 07:56:18 -07:00
meter_test.go Only registers callbacks if non-drop aggregation is used (#3408) 2022-11-11 09:10:59 -08:00
meter.go Only registers callbacks if non-drop aggregation is used (#3408) 2022-11-11 09:10:59 -08:00
periodic_reader_test.go Move Aggregation/Temporality selection to the Exporter interface (#3260) 2022-11-01 07:56:18 -07:00
periodic_reader.go Move Aggregation/Temporality selection to the Exporter interface (#3260) 2022-11-01 07:56:18 -07:00
pipeline_registry_test.go Restructure instrument creation code paths (#3256) 2022-11-10 16:04:53 -08:00
pipeline_test.go Do not export aggregations without any data points (#3436) 2022-11-11 07:22:27 -08:00
pipeline.go Only registers callbacks if non-drop aggregation is used (#3408) 2022-11-11 09:10:59 -08:00
provider_test.go Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
provider.go Associate views with MeterProvider instead of Reader (#3387) 2022-10-31 07:55:54 -07:00
reader_test.go Associate views with MeterProvider instead of Reader (#3387) 2022-10-31 07:55:54 -07:00
reader.go Move Aggregation/Temporality selection to the Exporter interface (#3260) 2022-11-01 07:56:18 -07:00