Commit Graph

65 Commits

Author SHA1 Message Date
jason plumb 7b86d53427
Let clock be overridden for log creators (#3823)
* Allow the clock to be overridden so that we aren't directly coupled to System.currentTimeMillis()

* move clock usage to dedicated test

* move clock foolery to its own dedicated test method

* address some code review comments and checkstyle violations

* cleanup: remove builder() from LogData interface and remove clock methods from LogBuilder interface.

* make inner impl static

* make method package private

* factor builder out to top-level class and remove creation work from constructor

* fix up tests for SdkLogEmitter and SdkLogBuilder

* backfill coverage for second shutdown

* remove mock
2021-11-09 14:00:33 +09:00
jack-berg f171884ed5
Refactor Log SDK to implement OTEP-0150 (#3759)
* Add log processors to the builder so LogSinkSdkProvider is immutable

* Add api diff

* Rename to SdkLogSinkProvider

* Rework log sdk

* Refactor logging sdk to implement OTEP-0150

* Fix typo

* Add unit tests

* Reorganize to facilitate potential future API

* Rename ReadableLog* to SdkLog*, make SdkLog* package private

* Add LogEmitterProvider interface, tidy up some javadoc

* Respond to PR feedback

* Make SdkLogEmitterBuilder final

* Switch to LogEmitter.logBuilder().emit() pattern
2021-11-01 13:16:59 +09:00
Anuraag Agrawal 872c86cf8a
Migrate jaeger exporter to use GrpcExporter (#3800)
* Migrate jaeger exporter to use GrpcExporter

* Cleanup

* Update integration test

* Fix
2021-10-29 12:01:41 +09:00
Anuraag Agrawal 90f5efeb85
Replace gRPC dependency with okhttp for exporters. (#3786)
* Shade in okhttp for use as the default transport for gRPC exporters.

* Finish
2021-10-26 09:38:53 -07:00
Anuraag Agrawal ebf5507cde
Add PeriodicMetricReaderBuilder (#3735)
* Add PeriodicMetricReaderBuilder

* More tests

* Cleanup

* Improve default
2021-10-14 18:28:59 -07:00
Anuraag Agrawal 3d4dbec88a
Move logging extension to logs signal module (#3738) 2021-10-14 08:38:43 +09:00
jack-berg 8f426fb698
Add LogData interface, implemented by LogRecord. Elevate Severity to a top level class. (#3732) 2021-10-13 12:17:33 +09:00
Anuraag Agrawal 11cbbcf1b5
Use untilAsserted when waiting in OTLP integration tests. (#3703) 2021-10-07 08:07:03 -07:00
Anuraag Agrawal 776b4f71d7
Replace :proto usage with published io.opentelemetry.proto (#3697) 2021-10-06 11:51:17 -07:00
Anuraag Agrawal 63bec0727e
Allow OTLP gRPC exporters to work without grpc-java using okhttp directly. (#3684)
* Allow OTLP HTTP exporter to also export in gRPC format.

* detect classpath

* Revert HTTP exporter

* Apply to metrics / trace

* Most

* Fix

* Integration tests

* Clean

* Fix log message

* Assume validated
2021-10-06 16:26:11 +09:00
jack-berg 328f4c2a25
Add integration test for otlp http/protobuf log exporter (#3692) 2021-10-05 08:39:38 -07:00
jack-berg 25861531d6
Add otlp grpc log integration test (#3681) 2021-10-02 08:40:22 -05: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 0560c82d5c
Enable nullaway except for metrics. (#3668) 2021-09-28 09:28:00 -07:00
Anuraag Agrawal b88bfe16cc
Use repo ghcr images for integration tests. (#3644) 2021-09-22 08:28:09 -07:00
jack-berg bad62ec942
Add OTLP integration test for gRPC and HTTP Trace and Metric exporters (#3611)
* Add OTLP integration test for gRPC and HTTP Trace and Metric exporters

* Only export host port if docker is available.

* Respond to PR feedback.
2021-09-15 11:02:26 +09:00
Trask Stalnaker 47fd8814e6
Remove kotlin stdlib (#3590) 2021-09-09 16:38:50 -07:00
Anuraag Agrawal 6ef3091cfb
Copy in spotless-conventions from instrumentation repo (#3554)
* Copy in spotless-conventions from instrumentation repo.

* Reformat

* A few more dotfiles
2021-08-27 08:28:31 -07:00
Anuraag Agrawal 62be247018
Migrate B3 propagator integration test to Armeria. (#3460) 2021-08-10 09:42:08 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09: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 531abc0d24
Fix more tracestate testsuite cases. (#3120) 2021-04-06 15:54:57 -07:00
Anuraag Agrawal ac6d03be2d
Disable automatic running of tracecontext integration tests (#3119) 2021-04-06 09:01:25 -07:00
Anuraag Agrawal 43e0f5e1b1
Run w3c tracecontext tests as part of build. (#3103)
* Run w3c tracecontext tests as part of build.

* Drift
2021-04-05 08:08:31 -07:00
Anuraag Agrawal 276ebbde27
Bump version of tracecontext suite. (#3095)
* Bump version of tracecontext suite.

* Update integration-tests/tracecontext/docker/Dockerfile

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-04-02 08:00:01 -07:00
Anuraag Agrawal 09af031922
Migrate tracecontext test app to Armeria. (#3096)
* Migrate tracecontext test app to Armeria.

* Not using gson

* Cleanup
2021-04-02 07:52:47 -07:00
Anuraag Agrawal 8e9252bdd6
Add docker build for tracecontext testsuite. (#3094) 2021-04-02 12:50:00 +09:00
Piotr Glazar 1a9c9096a9
Resource.Builder for convenient work with Resource class (#3065)
* Resource.Builder for convenient work with Resource class

* Remove unused import

* Adding javadoc comment

* Spotless fix

* Code review fixes

* Adding Javadoc

* Call Resource.create instead of AutoValue
2021-03-31 15:53:33 +09:00
John Watson c667636643
A little bit of java 8 cleanup in the W3C integration test (#3078) 2021-03-30 18:57:47 -07:00
John Watson 3246075d86
Create some integration tests for the various B3 propagator options. (#3073)
* Create some integration tests for the various B3 propagator options.

* update tracer/span names

* use the right SDK in the right places

* add some explanatory comments around the numbers of expected spans

* clean up the test
2021-03-30 08:30:15 -07: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
Bogdan Drutu 93dd38a18d
Ensure ParametersAreNonnullByDefault is present in all packages (#2879)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-18 08:58:01 -08:00
Bogdan Drutu d439a43fb4
Mark public classes as final in intergration-tests/ (#2851)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-02-17 12:44:11 -08:00
Anuraag Agrawal 4623334c7c
Move Getter/Setter to top level (#2840) 2021-02-17 09:46:56 -08:00
Anuraag Agrawal fa8bb33646
[Breaking Change] Rename API getDefault to noop! (#2842)
* Noop!

* errorprone
2021-02-17 09:18:22 -08:00
Anuraag Agrawal 900c35ed8c
Migrate remaining gradle scripts to kotlin (#2820)
* Migrate remaining gradle scripts to kotlin

* Finish more
2021-02-16 14:11:07 -08:00
John Watson 61ef25befe
simplify the Jaeger integration test (#2806)
* simplify the Jaeger integration test

* remove un-needed shadow plugin
2021-02-12 12:18:45 -08:00
Anuraag Agrawal faa8bf867a
Replace DefaultOpenTelemetry builder / class exposure with a factory … (#2704)
* Replace DefaultOpenTelemetry builder / class exposure with a factory for configuring propagation only.

* newp

* Cleanup
2021-02-05 13:13:12 +09:00
Anuraag Agrawal 393420dd1c
Use shadow plugin to generate bundled jars. (#2641)
* Use shadow plugin to generate bundled jars.

* Update workflow

* Fix workflow command
2021-02-02 12:04:54 +09:00
Anuraag Agrawal 6eee5ba4ae
Update dependencies (#2618)
* Update dependencies

* Inline annotations

* Revert "Inline annotations"

This reverts commit 8facc4ddbe.

* Unmodifiable
2021-02-01 12:21:00 +09: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
John Watson c9038f0ef0
Deprecate the service name configuration options for exporters (#2566)
* deprecate the service name configurations on the jaeger and zipkin exporters

* merge from upstream
2021-01-21 12:52:29 -08:00
John Watson 1f84ec099b
Create a MANDATORY Resource instance containing mandatory attributes. Merge that into the default resource. (#2366)
* Assign a fallback service name to resources when building the signal Provider instances.

* Add a MANDATORY resource that will contain all mandatory attributes.

* some cleanups of leftover stuff

* make the MANDATORY resource instance private

* updates from ResourceAttributes changes

* be sure to set the service name in the jaeger tests
2021-01-21 09:01:16 -08:00
Anuraag Agrawal fb029b7d50
Deadline -> timeout for jaeger exporter (#2474) 2021-01-11 08:52:22 -08:00
Anuraag Agrawal 4916931740
Use health port for jaeger container startup check. (#2426) 2021-01-05 09:49:48 -08:00
Anuraag Agrawal f8f409bae5
Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and ad… (#2387)
* Rename OpenTelemetrySdkBuilder.build to buildAndRegisterGlobal and add non-registering version.

* Some clean
2020-12-25 11:04:02 +09:00
Anuraag Agrawal 24ef29efea
Add SimpleSpanProcessor.create and deprecate SimpleSpanProcessorBuilder (#2374)
* Deprecate SimpleSpanProcessorBuilder

* Null test
2020-12-23 12:31:02 +09:00
Anuraag Agrawal 68b939faab
Remove most addspanprocessor mutator invocations. (#2373)
* Remove more addSpanProcessor mutations

* Merge

* Cleanup
2020-12-22 11:28:19 +09: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