opentelemetry-java/sdk/metrics
Josh Suereth 0752a4bb17
Overhaul sdk.metrics package for new SDK: Decouple Instrument + Storage per-metric. (#3455)
* Peel away dependency between instrument API hooks and aggregator package.

- Create new BoundStorageHandle interface for synchronous instruments to use.
- Update all SDK instruments to use it.

* Set up interfaces for storage registry.

* Create MetricStorage abstraction

- Wire all SDK instruments through a MetricStorage abstraction.
- Move all wiring of measurements -> aggregators into an internal package.
- Migrate previous "Accumulation" classes to "storage" classes
- Do just enough to get things compiling (not tested yet)

Goal is to have the "Aggregator" package not referenced in the sdk.metrics package directly in the future.

* Fix tests for metric storage refactoring.

- Move tests to appropriate location
- For now just make view-things public
- Fix possible bug in test of labels processor + appending attributes in a test....

* Remove instrument registry (now metric registry)

* Rename DoubleValueRecorder => DoubleHistogram in SDK

* Rename LongValueRecorderSdk => LongHistogramSdk.

* Rename ValueObserver -> Gauge

* Rename instrument type enum

Update enum to match specification.

* Move ViewRegistry + Helper into internal package

* Fixes to benchmarks

* Add missing javadoc

* Remove references to Labels

* Fixes from review.

* Rework tryUnmap to test the exposed interface
2021-08-10 13:23:08 -07:00
..
src Overhaul sdk.metrics package for new SDK: Decouple Instrument + Storage per-metric. (#3455) 2021-08-10 13:23:08 -07:00
README.md Swap old Metrics API for currently specified Metrics API (#3423) 2021-08-05 13:58:49 -07:00
build.gradle.kts Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
gradle.properties Have projects set their release state to alpha instead of recognizing word metrics (#2428) 2021-01-05 09:07:18 -08:00

README.md

OpenTelemetry Metrics SDK

The code in this directory is currently the legacy impelmentation of the previous experimental metrics SDK specification.

The following set of known issues will be fixed aas the new SDK specification stabilizes:

  • The names of SDK insturments do not line up with API instruments.
  • Baggage / Context are not available to metrics / views.
  • The View API still uses the term LabelsProcessor.
  • Only one exporter is allowed.
  • Histograms are generating summaries.
  • Exemplars are not sampled
  • The set of Aggregators goes well beyond the expected "stable" list and (likely) will have some moved to extensions.
  • There is no exposed MetricProcessor interface.