* Add timeout between delta collection to avoid rapid collection cycles across multiple readers.
* Fix issue where exemplars were not sampling wall-clock time.
* Fix synchronous collection supression to track duration using Clock.nanoTime
* Fixes from review.
* Remove leftover TODO.
* Start of multi-exporter codebase.
* Restore InMemoryExporter + fix javadocs.
* Quick javadoc fix
* Fix some javadoc build failures and missing things.
* Fix bug with autoconfigure
* Modify InMemoryMetricReader + register methods to allow for immutable SdkMeterProvider
- InMemoryMetricReader is now a factory + reader
- Hide register on SdkMeterProvider
- Update all tests to make sure things pass.
* Make metric-readers 'immutable' post-construction of SdkMeterProvider. Update all code around registration of readers and autoconfigure. Create new 'sdk noop' meter provider for when we have no readers configured.
* Fix integration test.
* Fix jmh benchmarks for trace.
* Fix jmh build.
* Fix broken in-memory exporter things, and Noop API issue.
* Migrate MetricReader.Factory to MetricReaderFactory.
* Rename PeriodMetricReader.Factory to PeriodicMetricReaderFactory.
* Apply suggestions from code review
Co-authored-by: John Watson <jkwatson@gmail.com>
* Minor cleanup of ColectionHandle.
* Fixes from review.
* Extract delta accumulation and add tests.
* Fragment the abstraction in SynchronousMetricStorage for better separation of responsibilities.
* Add tests (and minor optimisation) for delta metric storage.
* Add test for temporal metric storage.
* Update temporal metric storage to fix issue w/ async instruments.
* Migrate Async storage to use temporal metric storage (with better tests).
* Another fix from review.
* Remove start epoch nano parameter from storage constructors.
* Fixes from review.
* Migrate flush -> forceFlush as per review.
* Add test coverage for flush.
* Fixes from review.
* Fix public API breakage.
* Fixes from review.
* Fix threadsafe annotations
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
* Initial implementation of simple ExemplarReservoirs
- Add an implementation of naive fixed-bucket reservoir sampling
- Add an implementation of FixedSizeHistogram reservoir sampling where latest-measurement per-histogram-bucket is kept.
- Add assertions for exemplars.
* Remove explicit locks for mild performance boost.
* Create a new random holder abstraction.
- Create new random holder abstraction that allows
- ThreadLocalRandom when efficient
- simple detection of Android + workaround for TLR
- Overridable with mocked random for testing.
- Update tracing RandomIdGenerator to leverage new RnadomHolder
- Expand exemplar reservoir tests to use new random holder
- Remove android-only random id generator test
* Add api diff + fix silly naming thing.
* Move random hodler to be Supplier, other updates from code review.
* Fixes from review.
* Fix bytebuddy issue with mocking.
* Expose aggregation configuration and wire in exemplar sampler
- Expose classes for aggregation configuration that are visible in exemplar sampler
- Create default exemplar sampler that samples w/ traces
- Expand metric benchmarks to include exemplar + no-exemplar to check overhead.
* Fix merge conflict.
* Wire exemplar filter config into autoconfigure module.
* Expose aggregation configuration and wire in exemplar sampler
- Expose classes for aggregation configuration that are visible in exemplar sampler
- Create default exemplar sampler that samples w/ traces
- Expand metric benchmarks to include exemplar + no-exemplar to check overhead.
* Fix merge conflict.
* Wire exemplar filter config into autoconfigure module.
* Migrate exemplar reservoir instantiation into aggregations. Start migrating off AggregatorFactory -> Aggregation.
* Small cleanup.
* Fixes from review (and report of clsasloader fixes from other laptop.
* Migrate to null-object pattern.
* Add internal boilerplate.
* Run spotless.
* Fix toString of aggregation values.
* Fix ==
* Initial implementation of simple ExemplarReservoirs
- Add an implementation of naive fixed-bucket reservoir sampling
- Add an implementation of FixedSizeHistogram reservoir sampling where latest-measurement per-histogram-bucket is kept.
- Add assertions for exemplars.
* Remove explicit locks for mild performance boost.
* Create a new random holder abstraction.
- Create new random holder abstraction that allows
- ThreadLocalRandom when efficient
- simple detection of Android + workaround for TLR
- Overridable with mocked random for testing.
- Update tracing RandomIdGenerator to leverage new RnadomHolder
- Expand exemplar reservoir tests to use new random holder
- Remove android-only random id generator test
* Add api diff + fix silly naming thing.
* Move random hodler to be Supplier, other updates from code review.
* Fixes from review.
* Fix bytebuddy issue with mocking.
* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/exemplar/AbstractFixedSizeExemplarReservoir.java
Co-authored-by: John Watson <jkwatson@gmail.com>
* Fix name from review.
* Update sdk/common/src/main/java/io/opentelemetry/sdk/internal/RandomSupplier.java
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Initially wiring of ExemplarReservoir into Aggregator
- Create ExemplarReservoir + ExemplarSampler public interface
- Wire ExemplarRervoir into Aggregators
- Basic AggregationHandle tests of exemplar interface
- Fix up all tests and things
DOES NOT wire exemplar usage into aggregators yet.
* Fix JMH tests
* Wire exemplar reservoir usage into histogram aggregation
* Wire exemplar reservoirs into long aggregators
* Add DoubleAccumulation and fix exemplars in double-based aggregators.
* Renames from review.
* Fixes from review
- Clean up ExemplarStorageStrategy to have less dumb name
- don't have publicly accessible singletons on interfaces
- Call suppliers, suppliers.
* Rearrange methods on AggregatorHandle.
* More fixes from reviews
* Update documentation for Aggregator and add tests for merge method
- Fix issue in Histogram accumulations merge method
- Update all tests to check merge prefers recent measurement
- Document (likely bug scenario) where async measurements get merged outside a "previous/next" scenario.
* Add package private constructor for Exemplar Sampler.
* Add attribute length limits to SpanLimits.
* Respond to PR feedback
* Respond to PR feedback
* Remove test utility function
* Rename method to getMaxAttributeValueLength
* Rename LabelsProcessor to attribtues processor and allow it to interact with context/baggage appropriately.
* Flesh out view API from SDK specification and add tests for new features.
* Add better end-to-end test of baggage/context usage in attributes processor.
* Shrink size of attributes processor from early prototype.
* Reduce public aggregator API to match latest specification. (#3557)
* Move aggregators to internal package so it's not exposed in public API for first release.
* Continue migrating aggregators to hidden api, expose new public api.
* Fix tests.
* Fix up some name issues.
* Fix up javadoc.
* Fix autoconfigure tests.
* Minor cleanups.
* Fixes from review.
* Fixes from review.
* Remove aggregation extension and update tests.
* Fixes from review.
* Fix merge conflicts.
* update from PR feedback.
* Run spotless.
* Fixes from review.
* Move aggregators to internal package so it's not exposed in public API for first release.
* Continue migrating aggregators to hidden api, expose new public api.
* Fix tests.
* Fix up some name issues.
* Fix up javadoc.
* Fix autoconfigure tests.
* Minor cleanups.
* Fixes from review.
* Fixes from review.
* Remove aggregation extension and update tests.
* Fixes from review.
* Avoid unnecessary calls to TraceId and SpanId.isValid()
* Alternative: move ImmutableSpanContext to internal package
* javadoc
* Only skip for safe IdGenerators
* Simplify
* Errorprone
* Add test and fix boolean logic
* Spotless
* Add test
* Revert toString test change
* Only compute nanoTime once for a root span.
* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/RecordEventsReadableSpan.java
* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/RecordEventsReadableSpan.java
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
* Allow synchronous instruments to have multiple views per-instrument.
- Split writeable api from readable api for storage
- Create multi-writeable APIs for when multiple views are defined per instrument.
- Add test to ensure multiple metrics can be exported
- Fix minor issues in registry + sdk meter provider limiting multi-view registration.
* Allow multiple metrics to be registered per async instrument
* Don't fail on metric-identifier overlap, just log.
Does not update tests.
* Fix SdkMeter tests to use logs instead of exceptions
* Fix code reivew comment.
* Fix spotless issue.
* Modify view lookup order to match SDK specification
* Correctly register views using metric/description name relabelling
* Wire view's metric descriptor into aggregators, allowing metric names to change.
* Add test for view renames.
* Fix jmh and javadoc issues.
* First set of chaanges for new view SDK
- Update default aggregaators
- Expand instrument selector for views
* Fix tests for histogram as default aggregation.
* Remove unimplemented view methods for now.
* Javadoc cleanups.
* Apply suggestions from code review
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Migrate to predicates for strings, and List instead of Linked maps.
* fix missing bucket count test for histogram stress.
* Add some tests and a few fixes.
* Fixes from review.
* More fixes from review.
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Fix some nullabiity in SDK.
* Cleanup
* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracer.java
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
* 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
* Update the API to the latest SDK specification.
* API updates to other sdk areas.
* First half of SDK updates for API.
Passing off to other cmoputer.
* Get SDK compiling again.
* Get tests compiling again (and failing).
* Fix bad copy-paste error.
* Get all SDK tests passing.
* More fixes to builds across SDK impls.
* Remove unecessary publics
* more fixes for new API.
* spotless fixes.
* Make tests for metric points order independent.
* Restore readme.
* Fix readmes.
* Add noop meter provider tests for code coverage.
* Add code coverage for assertion library.
* Fix wierd test failure that gradle cache is preventing me from seeing locally.
* Fix javadoc/spelling comments from review.
* Remove marker interfaces.
* Switch from atomic ref to volatile.
* Fixes from review.
* Apply suggestions from code review
Co-authored-by: John Watson <jkwatson@gmail.com>
* Fixes from review.
* Fixes from review.
* Update OTLP HTTP exporter to use new metrics api
Co-authored-by: John Watson <jkwatson@gmail.com>
* Add support for signal specific timeout and headers autoconfiguration.
* Attempt to fix build.
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>