* Added a static method "drain" under JcTools with a generic consumer
* Rename spanT to T
* Update sdk/trace-shaded-deps/src/main/java/io/opentelemetry/sdk/trace/internal/JcTools.java
* Rename Test methods
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* fix: fix BatchSpanProcessor worker thread is killed by non-runtime exception
* refactor: Propagate exception if fatal
* test: Add unit test for exporter throwing a non-runtime exception
* Overload put with AttributeKey with String array
* Use generic instead of String
* Format and javadoc
* Cast to type
* New public method
* File based view configuration (#4163)
* Add experimental view config module
* Rename view-config to metric-incubator
* Switch naming from camelCase to snake_case
* Extend with attribute key filter
* Wire up to autoconfiguration
* Use snakeyaml instead of jackson
* PR feedback
* PR feedback
* Remove explicit okio dependency (#4187)
* Deprecate PrometheusCollector (#4185)
* Correct javadoc
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Cast to type
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* 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.
* 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>
* Add attribute length limits to SpanLimits.
* Respond to PR feedback
* Respond to PR feedback
* Remove test utility function
* Rename method to getMaxAttributeValueLength
* 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>
* 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>