Commit Graph

254 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 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
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
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 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 7c95af2a0e
Rename isRecordingEvents to isRecording (#607)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-11 16:09:28 -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 58aa8d3468 Per spec change, allow start digit and @. (#563)
* Per spec change, allow start digit.  Fixes #562

* reject multiple at signs

* reformat

* remove redundant check
rename method to match its usage

* return to a negatively named method that is more clear

* add a todo to benchmark the key validation code

* formatting
2019-10-04 12:37:02 -04: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
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 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 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 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
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
Bogdan Drutu 6345e47417
Remove capability to set a resource for metrics construction (#512) 2019-09-11 12:16:57 -07:00
Yang Song 63109827ea Rename TraceOptions to TraceFlags (#524) 2019-09-11 11:54:15 -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
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
Bogdan Drutu 5ac25d0a36
Fix the build after LabelKey was removed and Measure was added. (#497) 2019-08-15 16:07:10 -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
qudongfang fc74e77ae6 Fix service provider not found exception message (#491)
* Fix service provider not found exception message.

Signed-off-by: qudongfang <qudongfang@gmail.com>

* Format with google java style.

Signed-off-by: qudongfang <qudongfang@gmail.com>
2019-08-14 19:29:26 -07:00
Bogdan Drutu 9ede324d9d
Remove unnecessary LabelValue object. (#433)
* Remove unnecessary LabelValue object.

* Remove the LabelValue class and all usages.
2019-08-13 16:21:28 -07: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
Chris Kleinknecht 0478651e34 Fix typo in isRecordingEvents (#470) 2019-07-24 09:55:12 +03:00
Yang Song ada4edaa56 Change the order of measure type enum to match specs. (#458) 2019-07-03 11:41:03 -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
Yang Song da7ad86bee Move HTTP and binary trace context format to trace.propagation. (#450) 2019-06-28 10:23:01 -07:00
Yang Song a9054017f0 Return DefaultSpan if not recording events. Implement TracerSdk.shutdown(). (#447)
* Return DefaultSpan if not recording events.

Fixes #438

* Implement TracerSdk.shutdown().

Fixes #444.

* Fix review comments.

* Ignore recordEvent or sampler if already shut down.

* Remove isStopped. Fix synchronization.

* Improve test coverage.
2019-06-28 09:59:05 -07:00
Yang Song 5a1681855f Rename TraceContextFormat to HttpTraceContext. (#449) 2019-06-28 09:29:54 -07:00
Yang Song 3b6d6c5b17 Implement binary format on SpanContext. (#446)
* Implement binary format on SpanContext.

Fixes #443.

* Rename to BinaryTraceContext.
2019-06-28 09:17:33 -07:00
Armin Ruech 36f80e1fdc Change DistributedContextSdk.Builder to use current dctx as implicit parent (#439)
* Change DistributedContextSdk.Builder to use current DistributedContext as implicit parent if none is provided explicitly

* Change DistributedContext.setNoParent to prevent inheriting an implicit context

* Clarify doc for DistributedContext.setNoParent

* Disallow null for DistributedContext.setParent
2019-06-27 14:20:54 -07:00
Yang Song 6378db90fe Replace DistributedContext.getIterator with getEntries. (#429)
* Replace DistributedContext.getIterator with getEntries.

Fixes #401.

* Clarify immutability in javadoc.
2019-06-27 10:38:29 -07:00
Pavol Loffay bff193d462 Connect span builder and span in SDK (#430)
* Connect span builder and span in SDK

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

* Use proto in tests

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

* Remove

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

* Fix comments

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

* Fix review comments

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

* Add sampling attributes to span

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

* Remove line

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
2019-06-27 10:28:58 -07:00
Armin Ruech ed42237b6c Remove DistributedContext.Builder.buildScoped() (#428)
* Remove DistributedContext.Builder.buildScoped()

* Specify default parent for DistributedContext
2019-06-25 11:01:39 -07:00