Commit Graph

125 Commits

Author SHA1 Message Date
Bogdan Drutu c24e4a9636
Some minor cleanups (#627)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-23 19:48:40 -07:00
Bogdan Drutu b4e007cbf9
Remove util/Links.java (#623)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-22 19:40:30 -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
Bogdan Drutu 7c0af113a1
Remove util/Events. (#622)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-22 17:32:11 -07:00
Bogdan Drutu 238d42a093
Fix build and add more tests (#621)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-22 17:02:59 -07:00
John Watson 60ba3b7547 Add named tracers to the API (#584)
* A rough idea of how named tracers might look in the API.

* update to require at least a name for the tracer

* Introduce another layer of factory for the provider

* remove convenience tracer methods from the OpenTelemetry class.

* Update api/src/main/java/io/opentelemetry/trace/spi/TracerFactoryProvider.java

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

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

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

* Add clarifying javadoc, per PR review

* reverse who calls whom
2019-10-21 17:36:17 -07:00
Carlos Alberto Cortez a10e918e59 Move InMemorySpanExporter to exporters/ (#618) 2019-10-21 17:33:16 -07:00
Bogdan Drutu 39a0664dbf
Move Probability sampler to Samplers. (#616)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-14 17:57:49 -07:00
Bogdan Drutu 9c60dc1a09
Move utils from API to SDK. (#613)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-14 17:45:33 -07:00
Bogdan Drutu 4ffa516a6a
Move utils/Samplers from API to SDK Samplers (#614)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-14 15:34:51 -07:00
Bogdan Drutu a02b6d3927
Fix OpenTracingShim to run with SDK without baggages. (#608)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-14 08:44:57 -07:00
Bogdan Drutu 12ca38aa2f
Remove setRecordEvents option from the Span.Builder (#606)
* Remove setRecordEvents option from the Span.Builder

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

* Fix build, remove unnecessary overrides

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-12 11:32:54 -07:00
Bogdan Drutu a52617b14e
Move traceconfig proto helper out of SDK and remove protobuf dependency (#611)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-11 16:13:19 -07:00
Bogdan Drutu 7c95af2a0e
Rename isRecordingEvents to isRecording (#607)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-11 16:09:28 -07:00
Bogdan Drutu 8973bc371a
Cleanup and update dependencies. (#602)
* Cleanup and update dependencies.

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

* Fix build

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

* Fix build

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-11 08:49:03 -07:00
Carlos Alberto Cortez 0612372fd4 Add explicit timestamp support for Span start/end. (#571)
* Allow explicit Timestamp values for Span start/end.

* Update the code after merging master.

* Set end/start options only for the API.

* Add a clarification on setStartTimestamp().

* Make EndSpanOptions.getDefault() package private for now.
2019-10-11 08:34:45 -07:00
Jason Plumb 3c197e6023 remove protobuf from timestamp converter and friends. (#604)
* remove protobuf from timestamp converter and friends.

* remove unnecessary method
2019-10-11 08:25:38 -07:00
Carlos Alberto Cortez f15bb4a7ea Expose the global telemetry objects as sdk ones. (#598) 2019-10-10 11:04:17 -07: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
John Watson 9ac8d2d5ee Add a method to the ReadableSpan to get the SpanData copy (#583)
* add ReadableSpanAdapter as the next step toward leveraging SpanData.

* move the conversion into a method on the ReadableSpan interface.

* replace the tests that use protobuf spans to use SpanData

* remove unused method

* get rid of an un-needed interface method

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

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>
2019-10-01 18:08:22 -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
John Watson bdf4a6d57c Timestamp moved underneath the SpanData PR. (#572)
this fixes that.
2019-09-27 10:36:33 -07:00
John Watson 1d68d86135 Add the SpanData class, for future use in export (#567)
* Add the SpanData class, for future use in export

* address code review comments

* add missing javadocs

* reformat

* Let's see how this feels with the context removed and the 4 fields added instead.

* add missing javadocs

* Get the default values in place for collections and parentSpanId.
Write a test for the SpanData

* add junit runwith

* move spandata up to the trace package

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

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>
2019-09-27 09:32:49 -07:00
Bogdan Drutu 9a6c1d69d1
Move timestamp to common because it is shared by trace and metrics (#570)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-26 18:08:37 -07:00
Bogdan Drutu 29298b638b
Add builders for gauge, counter and observer metrics (#569)
* Add builders for gauge, counter and observer metrics

* Update sdk/src/test/java/io/opentelemetry/sdk/metrics/AbstractCounterBuilderTest.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>
2019-09-26 17:15:00 -07:00
Bogdan Drutu 2e779bb2e1
Add metrics data and metric descriptor, to avoid using proto (#564)
* Add metrics data and metric descriptor, to avoid using proto

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

* Fix review comments.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-26 12:53:11 -07:00
Bogdan Drutu 646135f056
Remove addLink API from the Span (#558)
* Remove addLink API from the Span

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

* Add javadoc and remove unnecessary null check.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-24 12:03:31 -07:00
Bogdan Drutu 2c6c687b5e
Add metric observer and remove setCallback from Metric base class (#548)
* Add metric observer and remove setCallback from Metric base class

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

* Fix javadoc and formatting

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

* Update api/src/main/java/io/opentelemetry/metrics/Meter.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Update api/src/main/java/io/opentelemetry/metrics/Meter.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Update javadoc for observerLongBuilder

* Update api/src/main/java/io/opentelemetry/metrics/Observer.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Update api/src/main/java/io/opentelemetry/metrics/Observer.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Update api/src/main/java/io/opentelemetry/metrics/Meter.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Update api/src/main/java/io/opentelemetry/metrics/Meter.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>
2019-09-19 12:19:40 -07:00
Carlos Alberto Cortez 10cace89dc Make Span.Builder properly set the Links in the Span. (#544) 2019-09-19 09:58:25 -07:00
Bogdan Drutu 8be6a282b5
Make Measure a Metric and add support for Handle. (#539)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-18 13:16:09 -07:00
Bogdan Drutu de4f3bcfc5
Move Resource package to SDK (#538)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-17 16:50:08 -07:00
Tigran Najaryan bb44fabfa0 Fix typo in FailedNotRetryable (#516) 2019-09-11 12:16:27 -07:00
Yang Song 63109827ea Rename TraceOptions to TraceFlags (#524) 2019-09-11 11:54:15 -07:00
Pavol Loffay b13457b2a8 WIP: Comsume proto files from git submodule and build them in a separate module (#504)
* Comsume proto files from git submodule and build them in a separate module

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

* Install make

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

* Fix CI

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

* Add back animalsniffer

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

* Polish gradle

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

* Move proto to libraries

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

* remove install make run

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

* Install make to openjdk9 image

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

* Add comment

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-08-22 09:00:14 -07:00
Bogdan Drutu 66a15d3bd5
Fix android 14 build for sdk. (#505) 2019-08-20 14:21:53 -07:00
Bogdan Drutu c1a60bb1b9
Add the capability to record a batch of measurements. (#500)
* Add the capability to record a batch of measurements.

* Rename meter method name, add more tests.

* Add tests for not throwing exceptions.
2019-08-19 16:42:57 -07:00
Bogdan Drutu 2e0f703495
Remove SpanData per the RFC. (#495)
* Remove SpanData per the RFC.

* Fix review comments.

* Add more tests.

* Remove all references to SpanData.
2019-08-19 13:57:10 -07:00
Carlos Alberto Cortez ce325c4eeb Properly set TimestampConverter from implicit parent Span. (#499) 2019-08-16 08:25:22 -07:00
Bogdan Drutu 5f87aff868
Remove record from Meter and add Measure type with record. (#488)
* Remove record from Meter and add Measure type with record.

* Add more tests.

* Fix tests.
2019-08-15 15:03:07 -07:00
Bogdan Drutu 0a0032bd0e
Remove description from LabelKey and use directly String. (#489) 2019-08-15 09:35:52 -07:00
Bogdan Drutu 5acf1e87e1
Add an AsyncSpanProcessor that uses Disruptor. (#468)
* Add an AsyncSpanProcessor that uses Disruptor.

* Fix comments.

* Cleanup print messages and simplify tests

* Enforce shutdown to wait for all the processors to finish shutdown.
2019-08-13 10:51:11 -07:00
Jiří Daněk f1b1fef75a Fix typo in name of setMaxQueueSize setter (#480) 2019-08-07 14:02:37 -07:00
Bogdan Drutu 861f4e6c55
Add ResultCode to the SpanExporter interface. (#471)
* Add ResultCode to the SpanExporter interface.

* Add javadoc for public enums and fields.

* ./gradlew goJF

* Reapply suggestions.
2019-08-06 21:28:10 +02:00
Yang Song f42b6dc41b Fix all typos (#473)
Changes are generated with
$ make misspell-correction

See https://github.com/client9/misspell
2019-08-05 18:35:06 +02:00
Bogdan Drutu 2304ad9a00
Fix javadoc comments in InMemorySpanExporter and add example of usage. (#464) 2019-07-11 07:10:49 -07:00
Bogdan Drutu 4c290e236d
Remove sync prefix from SpanProcessor interface methods. (#460) 2019-07-09 09:26:31 -07:00
Carlos Alberto Cortez 2488eef5ef Ignore parent if SpanContext.isInvalid() is true. (#459) 2019-07-09 07:13:47 -07:00
Yang Song 7471a94506 Change Sampler.shouldSample to accept list of Link. (#455)
* Change Sampler.shouldSample to accept list of SpanContext.

Fixes #437

* Improve test coverage.

* Change Sampler signature shouldSample to accept list of Links.
2019-07-01 16:44:55 -07:00
Bogdan Drutu 98bea4a9f6
Add batch span processor. (#456)
* Add batch span processor.

* Update sdk/src/main/java/io/opentelemetry/sdk/trace/export/BatchSampledSpansProcessor.java

Co-Authored-By: Yang Song <songy23@users.noreply.github.com>

* Remove @SuppressWarnings(JdkObsolete) from tests.

* Add default values as constants, comment on setter about default values.

* Remove unnecessary since tag from tests.

* Change the batch creation logic to avoid checking the limit every time.
2019-07-01 16:44:34 -07:00