1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-14 10:13:10 +02:00
opentelemetry-go/sdk
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
..
instrumentation Revert Adding attributes to the instrumentation scope. 2022-09-09 09:06:58 -05:00
internal Use already enabled revive linter and add depguard (#2883) 2022-05-19 15:15:07 -05:00
metric Only registers callbacks if non-drop aggregation is used (#3408) 2022-11-11 09:10:59 -08:00
resource Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963) 2022-10-19 09:13:20 -07:00
trace attribute: fix slice related function bug (#3252) 2022-10-13 09:34:02 -05: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