Commit Graph

51 Commits

Author SHA1 Message Date
Paulo Janotti c90ae9a69d Remove SpanID from sampling parameters 2020-05-28 16:33:22 -07:00
Giovanni Liva b30790c97e
Configuration for Disruptor and Zipkin (#1254)
* add configuration for Disruptor and Zipkin

* Fix checkstyle violation

* Address feedback

* Update Javadoc

* Add missing config test for Zipkin Exporter
2020-05-28 07:15:54 -07:00
Anuraag Agrawal 561c81e231
Inline generation of XRay trace IDs to remove heavyweight SDK depende… (#1274)
* Inline generation of XRay trace IDs to remove heavyweight SDK dependency.

* Revert unnecessary

* Squash
2020-05-26 06:46:58 -07:00
Pavol Loffay f54ae3e4f0
Fix Jaeger remote sampler flaky test (#1276)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-05-26 15:06:59 +02:00
John Watson d7f6d5a641
Extract SpanData to an interface (#1218)
* Extract SpanData to an interface.

* Move the inner link and event classes to the top level and rename for consistency.

* clean up a few errant references to the impl

* use the right annotation

* move the Link and Event back into the SpanData and give them simple names.
2020-05-14 18:10:38 -07:00
Bogdan Drutu 5dff1b9165
Remove unnecessary throws statements (#1205)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-05-12 10:54:16 -07:00
Bogdan Drutu bcacf39a9c
Apply intelij inspect suggestions for Java code (#1196)
* Apply intelij inspect suggestions for Java code

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

* Fix comments.
2020-05-11 16:54:39 -07:00
John Watson c930d13788
Add a MetricExporterFactory so auto-instrumentation can use SPI to load an exporter. (#1180) 2020-05-06 11:30:49 -07:00
Giovanni Liva ae06facb61
Fix build (#1132) 2020-04-24 07:00:31 -07:00
Pavol Loffay 610c92fa1c
Add Jaeger remote sampler (#1089)
* Add Jaeger remote sampler

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Add tests

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Add remote sampler to all BOM

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Make docker test optional

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Use scheduled thread pool

* Use daemon thread factory

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Cosmetic changes

Signed-off-by: Pavol Loffay <ploffay@redhat.com>

* Add readme

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2020-04-23 12:25:26 -04:00
Giovanni Liva 4bcfdb703f
Array values for span attributes (#807)
* [API] - Add Arrays for span attributes

* [SDK] - Add Arrays for span attributes

* [Exporters/Shim] - Add Arrays for span attributes

* add tests

* Adjust jaeger exporter to specification. Add tests.

* Fix checkstyle naming issue

* Add further tests.

* Align null value behavior of attributes with spec

* fix javadoc @since

* API must not crash on misusage of AttributeValue

* API - Remove Attribute ArrayValues from Span surface

* Immutable String array values for AttributeValue

* Immutable values for AttributeValue arrays

* ./gradlew goJF

* Implement ArrayAttribute

* Rebase and add tests

* Adapt RecordEventsReadableSpan
2020-04-21 11:08:24 -07:00
John Bley 04c34bf5da
Mark all threads/pools as daemon. (#1120)
* Mark all threads/pools as daemon.

* Move setDaemon calls inside try blocks as they can throw a security exception.

* Add javadoc comment about possibility of SecurityException.

* Create common/DaemonThreadFactory and adjust all thread creation to use it.

* Apply a name prefix in the DaemonThreadPool; rework and simplify several calling sites accordingly.
2020-04-20 07:12:39 -07:00
Carlos Alberto Cortez 690651b65a
Context propagation update (OTEP 66) (#720)
* Initial Propagators refactor.

* Add tests for the new propagators changes.

* Make the SDK compile/pass.

* Make the OT shim compile/pass.

* Make contrib components compile/pass.

* Improvement over Span/SpanContext handling in Context.

* Add Span.setParent(Context) overload.

* Do not provide default values for Span/SpanContext keys in Context.

* Improve the Context's active state handling.

* Rename DistributedContext to CorrelationContext.

* Improve names for correlationcontext's ContextUtils methods.

* Don't provide an automatic default for current CorrelationContext.

* Improve the client-server example after the recent changes.

* Adds CorrelationContext.Builder.setParent(Context) overload.

* s/be/become.

* Fix javadoc.

* No need to use diamond.

* Simply import withScopedContext().

* Fix the API/SDK build.

* Remove the builder from the Propagators interface.

* Fix name.

* Use Collections.emptyList() directly.

* Rename Propagators to ContextPropagators.

* Move context/ members in api/ to context_prop/

* Add check/tests for null scoped Contexts.

* Rename ContextUtils classes to better alternatives.

* Update the context* util classes.

* Make the code compile after the latest master merge.

* Cache the fields() in our default composite propagator.

* Remove the overloads of setParent(Context) for now.

* Use DefaultSpan for the tests instead of calling getTracerProvider()

* Fix the sdk testbed artifact build.

* Make the B3 propagator comply with the new propagator API.

* Simplify the HttpTraceContextTest tests.

* Simplify the ContextUtils* classes handling of default values.

* Minor nit.

* Update api/src/main/java/io/opentelemetry/OpenTelemetry.java

Co-Authored-By: Giovanni Liva <giovanni.liva@dynatrace.com>

* Annotate ContextPropagators with ThreadSafe instead of Immutable.

* Do not use the fully qualified ContextUtils identifier.

* Remove SpanContext support from TracingContextUtils.

* Rever to using non-defaulted key for TracingContextUtils.

* Revert the default keys for CorrelationsContextUtils.

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
2020-03-20 13:38:05 -07:00
Mike Goldsmith 577bab0032
move AttributeValue to common package (#1005) 2020-03-12 12:54:00 -07:00
Armin Ruech 91d2132f62
Rename resource labels to attributes (#970) 2020-03-10 16:35:17 -07:00
Bogdan Drutu 4c7072a1e4
Add javadoc link to all readmes (#981)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-03-09 14:32:22 -07:00
Bogdan Drutu bb6d4cb02d
Move otproto utils from exporter to a contrib sdk package (#980)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-03-09 13:02:35 -07:00
Bogdan Drutu 56719f02b6
Update InMemoryTracing to use builder, and limit the public API. (#947)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-28 12:44:49 -08:00
Bogdan Drutu c80d7f7a76
Small cleanups in async processor (#934)
* Small cleanups in async processor

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

* Customize the log messages for different actions happening after shutdown

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-27 15:42:01 -08:00
Pontus Rydin bce734c2bd
Added SpanExporterFactory and Config (#912) 2020-02-27 20:33:05 +01:00
Bogdan Drutu 9eeeb3da0c
Avoid calling processors that do not require an event. (#935)
* Avoid calling processors that do not require an event.

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

* Add tests for NoopSpanProcessor

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-26 12:10:58 -08:00
Giovanni Liva c4537e0d67
Block Disruptor until flush is performed (#913)
* Block disruptor until flush is performed

* Fix format

* Fix test

* Single enqueue method

* General cleanup

* Refactor shutdown/forceFlush
2020-02-26 09:01:39 -08:00
Bogdan Drutu 5a09b818d9
More gradle cleanups (#910)
* More gradle cleanups, separate jmh and jmhreport config

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

* Remove the need to includ jmhreport

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

* Only projects with the plugin maven-publish will be published

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-02-24 09:58:04 -08:00
Giovanni Liva 073ece13b8
Implementing ForceFlush for SpanProcessor (#882)
* first implementation of ForceFlush

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

Co-Authored-By: John Watson <jkwatson@gmail.com>

* Rename flush -> shutdown. Add test

* Better wording in Javadoc

Co-authored-by: John Watson <jkwatson@gmail.com>
2020-02-21 11:27:18 -08:00
Bogdan Drutu a148263597
Switch to use pluginManagement, Use gradle plugin for jmh. (#903)
* Switch to use pluginManagement, Use gradle plugin for jmh.

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

* Fix jmh report

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

* Use ' for the moment for plugin ids in main gradle
2020-02-21 10:19:51 -08:00
Giovanni Liva 24e470522d
Use AttributeValue in Resources (#883)
* Introduce ResourceValue

* Reuse AttributeValue for ResourceValue

* Constant resource value as AttributeValue

* ./gradlew goJF

* Rebase
2020-02-21 10:15:15 -08:00
Giovanni Liva b0d42dd4cc
Rename TracerRegistry -> Tracer Provider (#879)
* Rename TracerRegistry -> Tracer Provider

* Add comment to address the provider name

* gradlew goJF
2020-02-20 07:26:13 -08:00
John Watson b0d6258bfe
Add a module for auto-instrumentation agent configuration bridge code. (#862)
* Add a module for auto-instrumentation agent configuration bridge code.

* add the new module as a sub-module of all
2020-02-15 09:18:55 -08:00
Bogdan Drutu 38d9352a84
Move SpanData to data package, consistent with metrics. (#848)
* Move SpanData to data package, consistent with metrics.

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

* Update SpanDataTest.java
2020-02-11 17:53:23 -08:00
Bogdan Drutu 24b1813525
Cleanup sdk.trace API (#804)
* Cleanup sdk.trace API

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

* Make TracerSdk public

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-01-28 12:49:36 -08:00
Kevin Brockhoff e4dce28aea Update to latest Resource semantic conventions. (#786)
* Update to latest Resource semantic conventions.

* expand test to cover new property
2020-01-23 15:10:23 -08:00
Jonathan Giles ecad8609aa Introduce automatic module names into all libraries being built. (#781)
* Introduce automatic module names into all libraries being built.

* Centralise manifest config of automatic module name into root build.gradle file.

* Adding empty new lines
2020-01-22 18:22:00 -08:00
Tyler Benson 7b601b1ad0 Rename Setter.put to Setter.set (#769)
Improving consistency and cohesion of naming.
2020-01-17 13:54:07 -08:00
Bogdan Drutu c54a4e94ea
Avoid calling the AWS specific methods in unit-tests. (#748)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-01-13 21:04:05 -08:00
Kevin Brockhoff 6859896f31 Add AWS support to SDK (#743)
* Initial dev of XRay ids generator

* Initial dev of EC2 resource labels retrieval and population

* renamed module to emphasize it uses v1 of AWS SDK

* fix code review issues

* fix test code review issues

* Add RunWith annotation
2020-01-13 11:21:27 -08:00
John Watson 91053c45c8 rename the factories to registries (#725) 2020-01-06 20:11:02 -05:00
Bogdan Drutu 69a0f465cb
Cleanup deprecated methods in TracerSdk (#651)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-30 15:12:46 -07:00
Bogdan Drutu ce1cd9c3bd
Remove Timestamp and change start/end times to use epoch nanos (#646)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-28 19:51:39 -07:00
Bogdan Drutu d6befaf711
Remove special timestamp definition (#619)
* Remove sepcial timestamp definition

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

* Update api/src/main/java/io/opentelemetry/trace/Span.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>

* ./gradlew goJF

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

* fix build

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-22 18:14:55 -07:00
Carlos Alberto Cortez a10e918e59 Move InMemorySpanExporter to exporters/ (#618) 2019-10-21 17:33:16 -07:00
Carlos Alberto Cortez 2f50f54cd2
Move the InMemory artifact to exporters. (#600) 2019-10-11 05:56:30 +02:00
Carlos Alberto Cortez 16a45ff740
Update the inline docs for InMemoryTracing. (#599)
We now use SpanData, not the proto representation.
2019-10-10 19:29:59 +02:00
John Watson 08d58837c1 Convert the export system to use SpanData (#587)
* SpanData Export refactoring

* getting our span data exporter work to use the new SpanData implementation

* getting up to date with the moved Timestamp

* Update post rebase

* A few cleanups from PR comments

* A few more cleanups.
2019-10-05 00:39:30 -04:00
Pavol Loffay fe19a23c9e Report span which is recording events (#503)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-10-02 07:11:40 -07:00
Bogdan Drutu 1aa49037df
Update errorprone, remove stale disabled checks. (#579)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-30 11:43:23 -07:00
Bogdan Drutu 9b294a6741
Remove -Xlint:-deprecation from compiler options (#578)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-30 08:54:16 -07:00
Carlos Alberto Cortez b50ca87607
Use a CountDownLatch to coordinate MultipleCallbacksTest. (#526)
Be more deterministic about this, as previous approaches
used sleep or sort by start time.
2019-09-13 15:02:32 +02:00
Carlos Alberto Cortez 925cf41839 Add a small artifact that joins TracerSdk and InMemorySpanExporter. (#494)
* Add a small artifact that joins TracerSdk and InMemorySpanExporter.

Used for OpenTelemetry integration testing.

* Re-organize the inmemory artifact.

* Put it under contrib.
* Use package io.opentelemetry.sdk.contrib.trace.export

* Move inmemory_export to sdk_contrib.
2019-08-27 09:57:13 -07:00
Bogdan Drutu 75811d4f41
Copy testbed for OpenTelemetry API (#513) 2019-08-26 11:09:16 -07:00
Bogdan Drutu db5347a3ee
Fix that disruptor does not accept events after shutdown. (#496) 2019-08-15 16:05:32 -07:00