Commit Graph

840 Commits

Author SHA1 Message Date
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 08c6d52109
Remove all APIs that allow passing context or other entries from the Context. (#582)
* Allow passing Context to all metrics

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

* Remove all versions that accept Context

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-01 20:10:43 -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
Carlos Alberto Cortez 6124f626f9
OT Shim baggage support (#482)
* Initial implementation of our OT shim's baggage support.
* Have a base class to contain TelemetryInfo.
2019-10-01 02:19:25 +02:00
Bogdan Drutu ddc53dbcc8
Remove unnecessary dependency in proto on API. (#581)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-30 13:44:49 -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
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 a86f034e85
Add tests for observer and all uncovered methods. (#568)
* Add tests for observer and all uncovered methods.

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

* More tests and update names

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-26 16:17:02 -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 85e4fe3b66
Add a no-op abstract observer builder to avoid duplicate code (#565)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-24 17:12:41 -07:00
Bogdan Drutu 1ee12511b3
Small cleanup to remove some duplicate code. (#561)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-24 12:40:26 -07:00
Bogdan Drutu 577a448f49
Remove Set from Counters, based on specs only Add. (#560)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-24 12:25:10 -07:00
Bogdan Drutu 81f283f20f
Remove Add from Gauges, based on specs only Set. (#559)
* Remove Add from Gauges, based on specs only Set.

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

* Update GagueDouble handle name in the example.

* Update handle name in GaugeLong example.
2019-09-24 12:17:54 -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 5f530a000a
Add monotonic option for Gauge/Observer/Counter (#556)
* Add the monotonic option when creating a Metric

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

* Change runtime metrics to set the right monotonic property

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

* Update to use monotonic only for gauge, counter and observer

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

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

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

* Fix style.
2019-09-24 11:04:44 -07:00
Bogdan Drutu ab9230bb42
Small fixes for javadoc in metrics (#553)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-09-20 15:03:41 -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
Yang Song ef66cd3306 Add missing sub-projects to all/build.gradle (#542) 2019-09-18 19:05:12 -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
Elliotte Rusty Harold 58e6abb833 replace assertj with Truth (#540)
* replace assertj with Truth

* replace assertj with Truth
2019-09-17 17:41:38 -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
Xi Xia 792a692650 organize build directions in docs (#537) 2019-09-17 16:26:07 -07:00
Elliotte Rusty Harold a07984605e Update to Guava 28.1 (#527) 2019-09-17 16:25:13 -07:00
Carlos Alberto Cortez 87a0988f7a Initial setup for publishing snapshots to OJO. (#523)
* Initial setup for publishing snapshots to OJO.

* Oops, we need a TAB instead of spaces in Makefile.
2019-09-13 08:31:20 -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
Elliotte Rusty Harold 86f426aaa4 Update to Truth 1.0 (#528) 2019-09-12 09:44:13 -07:00
Bogdan Drutu 6345e47417
Remove capability to set a resource for metrics construction (#512) 2019-09-11 12:16:57 -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 78e4e10888 Set proto submodule to upstream repository (#514)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-08-29 09:25:08 -07: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 55717b880c
Enforce name restriction for all the metrics (#511)
* Enforce name restriction for all the metrics

* Add more tests and thrown annotation to the API
2019-08-23 12:41:27 -07:00
Bogdan Drutu 0c5bbb127f
Fix tests and add more coverage (#510) 2019-08-23 10:53:20 -07:00
Bogdan Drutu 8c3aabf487
Remove clean from metrics. (#509) 2019-08-22 17:48:47 -07:00
Bogdan Drutu d8f37b33b7
Rename Timeseries with Handle. (#508) 2019-08-22 17:27:03 -07:00
Yang Song 85bfda0d7e Update CONTRIBUTING.md after using git submodule and make (#507) 2019-08-22 16:38:19 -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
Carlos Alberto Cortez ec138d73c5
Sort finished Spans by either start/finish time in OT testbed. (#502)
Order the Spans in latespanfinish and multiplecallbacks cases
to *make sure* the invariant is enforced (prior to do assert
the conditions).
2019-08-21 15:26:37 +02:00
Bogdan Drutu 66a15d3bd5
Fix android 14 build for sdk. (#505) 2019-08-20 14:21:53 -07:00
Bogdan Drutu 5d6fae1869
Add thread safe annotations for the public API. (#501) 2019-08-20 08:21:13 -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 5ac25d0a36
Fix the build after LabelKey was removed and Measure was added. (#497) 2019-08-15 16:07:10 -07:00