* 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 ==
* Rename AnyValue to Body and allow only String values for now.
* Apply suggestions from code review
Thanks Jason!
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
* Convert Body to an interface.
* update from upstream changes
* move the StringBody into its own, non-public class
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
* Created an empty LogAdapter class and started reading equivalent implementation of SpanAdapter
* Started implementing LogAdapter, added Resource and InstrumentationLibraryInfo to LogRecord.
* Started implementing LogAdapter, added Resource and InstrumentationLibraryInfo to LogRecord.
* Continue the implementation of LogAdapter.
* Finished implementing LogAdapter.java, now moving on to writing a test for it.
* started implementing LogAdapterTest functions.
* Fixed error in log adapter
* Added Java docs
* Fixed errors with build.
* Finished LogAdapterTest
* Fixed PR Comments.
* Added "internal class boiler plait comment" to LogAdapter
* CR fixes.
* CR fixes.
* Fixed CR requests
* Fixed CR requests
* Fixed CR requests
* Update exporters/otlp/common/src/main/java/io/opentelemetry/exporter/otlp/internal/LogAdapter.java
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
* Update sdk/testing/build.gradle.kts
* Update exporters/otlp/common/build.gradle.kts
* Test dependency
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
* 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.
* Make Jaeger remote sampler available via SPI
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* use env vars
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* Add more tests
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* fix
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
* 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 setTrustedCertificates support to OtlpGrpcMetricExporterBuilder
* Add signal specific certificate configuration to autoconfiguration
* Improve test coverage.
* Try to meet code coverage requirements.
* Qualify SslUtil.setTrustedCertificatesPem
* Add support for signal specific timeout and headers autoconfiguration.
* Attempt to fix build.
Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
* Allow users to access the default Clock and TestClock
* Update TestClock API
* Doc
* Fix
* html
* Less newlines
* Update sdk/common/src/main/java/io/opentelemetry/sdk/common/Clock.java
Co-authored-by: John Watson <jkwatson@gmail.com>
Co-authored-by: John Watson <jkwatson@gmail.com>
* Update java metrics data model and create assertion based testing library.
* Update existing SDK for Label => Attribute in data model
- Finish wiring through changes to all code/tests.
- DOES NOT touch API
- Update existing tests to use new testing library to be sensitive to attribute vs. label hashing alterations + equality of the metrics.data package types.
* Fix javadoc breakages
* Fix JMH compile
* Finish javadoc
* Fixes from review
* Remove botched file.
* Fixes from review.
* Implement handling the OTEL_SERVICE_NAME env var.
* Update to use the semconv module and attributes testing helpers.
* add unit tests for testing API additions
* Update the OTLP protobuf version to 0.9.0.
Note: this does not include enforcing the semantic change of requiring histogram/summary sums to be excluded when the recordings are not all positive.
* rename method to be more accurate
* initial implementation of logging throttling
* simplify the throttle and incorporate into all the exporters
* small cleanup
* try the ratelimiter and see if it can work
* try the ratelimiter and see if it can work
* re-implement the ThrottlingLogger using the RateLimiter from Jaeger.
* code cleanup & additional tests
* add a unit test for the log level check
* Update sdk/common/src/main/java/io/opentelemetry/sdk/internal/ThrottlingLogger.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Don't auto-start the IntervalMetricReader in the constructor.
* a little more protection around the possibility of double-starting the IMR
* add a test that verifies we only start once
* tweak the values to see if CI likes it better
* make the test simpler for CI
* try a little bit longer time?
* change the test to make an assertion on a passed-in scheduler.
* Implement a leak-detecting SpanProcessor using the WeakConcurrentMap from the context internals.
* remove unnecessary double-wrapping of the throwable in the logs
* formatting
* Update sdk-extensions/tracing-incubator/src/main/java/io/opentelemetry/sdk/extension/incubator/trace/LeakDetectingSpanProcessor.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update sdk-extensions/tracing-incubator/src/main/java/io/opentelemetry/sdk/extension/incubator/trace/LeakDetectingSpanProcessor.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Update sdk-extensions/tracing-incubator/src/main/java/io/opentelemetry/sdk/extension/incubator/trace/LeakDetectingSpanProcessor.java
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Add a few more tests
* Formatting
* Make the test more robust, and change the WeakReference to hold a `ReadableSpan` rather than just the SpanContext.
* remove an extra gc call and inline a private constructor
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
* Support OTEL_EXPORTER_OTLP_METRICS/TRACES_ENDPOINT
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* update README.md
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* update README.md
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* add test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* reset global ot for tests
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* add not global test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* update test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* update test
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* added tearDown
Signed-off-by: Sergei Malafeev <sergei@malafeev.org>
* Ignore classpath error when otlp is set as metrics exporter but is not on the classpath since the default value is otlp but metrics is alpha.
* Update sdk-extensions/autoconfigure/src/main/java/io/opentelemetry/sdk/autoconfigure/MetricExporterConfiguration.java
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
* autoconfigure
* Finish
* Refactor
* Fix OsResource to use empty
* Fix BeanstalkResource to use empty
* Fix ResourceTest to use empty
* Fix Ec2Resource to use empty
* Fix EcsResource to use empty
* Fix ProcessRuntimeResource to use empty
* Fix ProcessRuntimeResource to use empty
* Fix EksResource to use empty
* Fix LambdaResource to use empty
* Fix ProcessResource to use empty
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Bogdan Drutu <lazy@splunk.com>
* Default to use SimpleSpanProcessor for LoggingSpanExporter when configured through env
When the SDK is configured to use a logging exporter from environment variables using autoconfiguration, a SimpleSpanProcessor will be used instead of a BatchSpanProcessor. For all other exporters, a BatchSpanProcessor will be used.
* Replace set of strings with a direct string equality
* Avoid calling TraceState.builder().build() and replace it with TraceState.getDefault();
* Avoid storing TraceFalgs.getDefault() and TraceFalgs.getSampler() and use them directly;
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This helps exporter to have access directly to bytes, hex or any other format we will expose for the ids in the SpanContext.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>