1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/sdk/metric
Tyler Yahn 4014204d42
Allow multi-instrument callbacks to be unregistered (#3522)
* Update Meter RegisterCallback method

Return a Registration from the method that can be used by the caller to
unregister their callback.

Update documentation of the method to better explain expectations of
use and implementation.

* Update noop impl

* Update global impl

* Test global Unregister concurrent safe

* Use a map to track reg in global impl

* Update sdk impl

* Use a list for global impl

* Fix prom example

* Lint metric/meter.go

* Fix metric example

* Placeholder for changelog

* Update PR number in changelog

* Update sdk/metric/pipeline.go

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add test unregistered callback is not called

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2022-12-16 12:02:42 -08:00
..
aggregation Recommend not recording cumulative explicit histogram min/max (#3403) 2022-10-31 18:59:05 -07:00
internal Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
metricdata Adds an Attribute assertion to metric data test (#3487) 2022-11-29 14:32:15 -06:00
benchmark_test.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08: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 Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
config.go Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
doc.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
example_test.go Remove unnecessary build restrictions for go1.18 (#3197) 2022-09-21 10:00:00 -07:00
exporter.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
go.mod Release v1.11.2/v0.34.0 (#3512) 2022-12-05 13:43:20 -06: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 Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
instrument.go Add View, NewView, Instrument, Stream, and InstrumentKind to sdk/metric with unit tests (#3459) 2022-11-16 08:18:02 -08:00
manual_reader_test.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
manual_reader.go Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
meter_test.go Allow multi-instrument callbacks to be unregistered (#3522) 2022-12-16 12:02:42 -08:00
meter.go Allow multi-instrument callbacks to be unregistered (#3522) 2022-12-16 12:02:42 -08:00
periodic_reader_test.go Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
periodic_reader.go Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
pipeline_registry_test.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
pipeline_test.go Replace view use from sdk/metric/view to sdk/metric (#3461) 2022-11-19 09:05:20 -08:00
pipeline.go Allow multi-instrument callbacks to be unregistered (#3522) 2022-12-16 12:02:42 -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 Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
reader.go Add Metric Producer as a new interface, which returns scope metrics (#3524) 2022-12-15 07:50:45 -08:00
view_test.go Add view example tests (#3460) 2022-11-21 07:45:47 -08:00
view.go Add View, NewView, Instrument, Stream, and InstrumentKind to sdk/metric with unit tests (#3459) 2022-11-16 08:18:02 -08:00