Commit Graph

48 Commits

Author SHA1 Message Date
Anuraag Agrawal ed7f82f873
Remove dependency on api:metrics which was deprecated where possible. (#3975) 2021-12-09 06:27:50 -08:00
Anuraag Agrawal 3190325aac
Remove deprecated ExecutorServiceSpanProcessor (#3864)
* Remove deprecated ExecutorServiceSpanProcessor

* Remove benchmark
2021-11-16 11:39:57 +09:00
Anuraag Agrawal 8855c6d9bf
Remove deprecated data incubator types (#3865) 2021-11-13 12:45:25 +09:00
Anuraag Agrawal 271f281993
Deprecate ExecutorServiceSpanProcessor. (#3815) 2021-11-04 13:22:38 +09:00
Anuraag Agrawal 1f22239188
Fix flaky test (#3810) 2021-11-01 07:54:46 -07:00
Anuraag Agrawal 47552172eb
Actually flush in ExecutorServiceSpanProcessor (#3806)
* Actually flush in ExecutorServiceSpanProcessor

* Fix mock reset

* Remove drift comment
2021-11-01 13:16:15 +09:00
Anuraag Agrawal 27c48f6ffe
Promote DelegatingSpanData out of incubator. (#3768)
* Promote DelegatingSpanData out of incubator.

* Not final equals
2021-10-20 12:48:56 +09:00
Anuraag Agrawal b6b1853511
Replace jctools dep in tracing-incubator with shaded jctools (#3730) 2021-10-12 08:17:30 -07:00
Anuraag Agrawal 5bc953ec68
Replace InMemoryMetricReader constructor with factory. (#3727)
* Replace InMemoryMetricReader constructor with factory.

* Update InMemoryMetricReader.java
2021-10-12 11:06:05 +09:00
Anuraag Agrawal b77c2b96b0
Deprecate SpanDataBuilder for removal from incubator. (#3713) 2021-10-08 09:43:01 -07:00
Anuraag Agrawal 776b4f71d7
Replace :proto usage with published io.opentelemetry.proto (#3697) 2021-10-06 11:51:17 -07:00
Josh Suereth 70086cf014
MetricReader and Multi-export features (#3578)
* 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>
2021-09-30 22:22:09 +09:00
Anuraag Agrawal b311d50d03
Fix some nullness. (#3647)
* Fix some nullness.

* Log
2021-09-22 09:00:57 -07:00
jack-berg 4a945e63e3
Add gradle ktlint spotless config to all projects (#3543) 2021-08-25 08:36:17 +09:00
jack-berg 58c16a9133
Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
Anuraag Agrawal 87f2b5e0a8
Update error-prone (#3485) 2021-08-13 09:44:29 -07:00
Josh Suereth 0ef19291c2
Swap old Metrics API for currently specified Metrics API (#3423)
* 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>
2021-08-05 13:58:49 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
BrianYan 9fdd001e58
Add factories for SamplingResult (#3410)
* fix:rebase it

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/samplers/SamplingResult.java

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-07-20 08:44:53 -07:00
Josh Suereth b12a57ed21
Migrate Metrics SDK "data' package to Attributes (#3352)
* 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.
2021-07-01 09:15:44 -07:00
Anuraag Agrawal ce9c8854c7
Extract publishing and animalsniffer plugins. (#3334) 2021-06-22 08:23:16 +09:00
Anuraag Agrawal 864508983e
Extract JMH conventions plugin. (#3324) 2021-06-17 08:37:49 -07:00
Anuraag Agrawal 7f544416e4
Define an extension for otel-specific configuration of Java. (#3317) 2021-06-17 15:54:25 +09:00
Anuraag Agrawal b9ca09b6c1
Extract java conventions plugin. (#3316) 2021-06-15 12:29:47 -07:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
John Watson 005b8c97ef
Add some javadoc to the new ExecutorServiceSpanProcessor & builder. (#3171) 2021-04-23 18:12:08 +09:00
Piotr Glazar 68b047e027
BatchSpanProcessor that uses provided ScheduledExecutorService (#3036)
* BatchSpanProcessor that uses provided ScheduledExecutorService

* Fixing spotless violations

* Checkstyle fix

* Spotless fix

* Fixing spotless violations

* Fixing checkstyle violations

* Fixing spotless violations

* Moving the code to the incubator module

* Delete obsolete gradle module

* Copy BatchSpanProcessor benchmarks to be used by ExecutorServiceSpanProcessor

* spotless fixes

* Better thread utilisation

* After merge main

* Convert AtomicBoolean into local variable

* Remove WorkerBase and introduce WorkerExporter

* More code review fixes
2021-04-20 09:28:36 -07:00
John Watson 8678b16b29
Implement a leak-detecting SpanProcessor using the WeakConcurrentMap … (#2984)
* 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>
2021-03-10 15:56:26 -08:00
Bogdan Drutu 75ea07e597
Fix more api dependencies which should be implementation (#2919)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-23 12:20:06 -08:00
John Watson 920f79d151
clean up the javadoc and make examples pasteable (#2824)
* clean up the javadoc and make examples pastable
resolves #2817

* formatting
2021-02-17 12:31:08 +09:00
Anuraag Agrawal e4886283a7
Migrate sdk-extensions to kts. (#2814) 2021-02-15 12:21:10 +09:00
Bogdan Drutu 19c002471e
Move Span.Kind to the upper level as SpanKind (#2646)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-02 12:27:54 -08:00
Bogdan Drutu 527b5f4549
Expose the SpanContext to the SpanData (#2660)
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>
2021-02-02 08:54:26 -08:00
Anuraag Agrawal 32a63fb8e3
Migrate to using gradle platform to manage dependency versions instea… (#2586)
* Migrate to using gradle platform to manage dependency versions instead of global variables.

* Remove unused and fix test

* Revert test yolo

* Workaround test ordering issue by just merging them

* Spot
2021-01-27 13:54:58 +09:00
Bogdan Drutu ca661b8c40
Avoid using inner classes in SpanData (#2495)
* Avoid using inner classes in SpanData

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Javadoc cleanups

* Remove non-existent type param

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
2021-01-12 19:12:00 -08:00
John Watson 5daa50ffdc
Mark a few more modules as alpha release status (#2436)
* mark a few more modules as alpha release status

* alphacate a few more modules

* remove the copyright/license from gradle.properties
2021-01-07 20:30:53 -08:00
John Watson 015708b7a7
Move the semantic conventions generated code into its own module (#2423)
* Move the semantic conventions generated code into its own module

* remove un-needed dependencies

* move the semconv module to the top level, out of the API namespace

* Update README.md

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* move SemanticAttributes to a more appropriate package and deprecate the old ones in the api package.

* Apply suggestions from code review

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-01-06 08:25:17 -08:00
Anuraag Agrawal 6954d1f624
Use normal filesystem-based Gradle paths. (#2332)
* Use normal filesystem-based Gradle paths.

* Update workflow by making agnostic to jacoco project name

* More merge
2020-12-18 12:07:33 +09:00
Anuraag Agrawal 17fa4e9c97
Only apply java-library to projects and configure reactively. (#2319)
* Use java-library

* Only apply java-library to projects and configure reactively.

* Consistency

* Cleanup
2020-12-17 09:11:44 +09:00
Anuraag Agrawal 4762c6a25d
Remove ReadableAttributes (#2187)
* Remove ReadableAttributes

* Don't rewrite history

* Drift
2020-12-03 11:26:24 -08:00
Anuraag Agrawal cf5b582c5b
Replace AttributeConsumer with BiConsumer (#2174)
* Replace AttributeConsumer with BiConsumer

* Forgot to delete
2020-12-02 16:52:06 +09:00
Anuraag Agrawal ca3714053f
Replace SpanData.hasRemoteParent/getParentSpanId with getParentSpanContext (#2146)
* Remove SpanData.hasRemoteParent

* Replace parentSpanId with parentSpanContext

* Update sdk/trace/src/main/java/io/opentelemetry/sdk/trace/RecordEventsReadableSpan.java

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Keep parentId

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2020-12-01 09:50:11 -08:00
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
Anuraag Agrawal b5efbcf187
Move builders to top level. (#1958)
* Move builders (and TraceStateEntry) to top level.

* Revert Entry

* Fix and more revert

* Drift
2020-11-10 14:50:37 +09:00
Anuraag Agrawal 9c4c52dfee
Switch animal sniffer signature to gummy bears. (#2015) 2020-11-06 08:56:26 +09:00
Bogdan Drutu 2dfc417e2d
Rename package name for sdk extensions to singular extension (#2002)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-04 12:26:43 -08:00
Bogdan Drutu 2046ec050e
Move testing-internal artifact to sdk-testing (#1987)
* Move testing-internal artifact to sdk-testing

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Fix missed usage of TestSpanData

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 13:54:43 -08:00
Anuraag Agrawal 390d92e49a
Rename folder names from underscore to hyphen (#1968) 2020-11-03 14:46:40 +09:00