Commit Graph

289 Commits

Author SHA1 Message Date
Armin Ruech 5485e18280
Remove incorrect `@throws NullPointerException` in AttributeValue (#808) 2020-01-30 09:59:28 -08:00
Uladzislau Kiva 8b4c1488e9
Solves #767 HttpTraceContext should not throw exceptions for non-fatal cases (#782)
* fix: HttpTraceContext::extract() fails on traceparent == null (#767)

* fix: HttpTraceContext::extract() fails on traceparent == null (#767)

* fix: HttpTraceContext::extract() fails on traceparent == null (#767)

* docs: add an

* refactor: use invalid span context from HttpTraceContext

* style: apply google code style

Co-authored-by: Uladzislau Kiva <vladislav.kiva@moneyman.ru>
2020-01-29 13:38:23 -08:00
Armin Ruech db31f4a796
Rename StringUtils.isNullOrBlank to isNullOrEmpty (#806) 2020-01-29 10:29:11 -08:00
Bogdan Drutu d4cf312671
Rename spi providers to match {}Provider name (#800)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-01-28 10:23:40 -08:00
Bogdan Drutu 01aece01a1
Remove bound support from Observers (#799)
* Remove bound support from Observers

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

* fix copyright

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

* Rename observer result method from put to observe

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

* Rename InstrumentWithBound to InstrumentWithBinding

Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
2020-01-27 10:21:44 -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
Bogdan Drutu bd4f3737d4
Add a new artifact context propagation (#754)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-01-21 08:49:34 -08:00
Armin Ruech a7730e4edf Fix usage of context.Scope (#779) 2020-01-21 08:38:44 -08:00
Giovanni Liva 61b50a6d2e Add Measure metrics (#772)
* Add Long and Double Measure

* Add builders to MeterSdk

* Fix * import. Address feedback of @jkwatson

* Rename TestBound->TestBoundMeasure
2020-01-17 15:13:37 -08:00
John Watson 42bff3e922 Ignore null or blank string-valued span attributes. (#771)
* Ignore null or blank string-valued span attributes.

* also ignore null & blank strings on active span attributes.

* change to ignore at the AttributeValue level, rather than above
2020-01-17 15:10:15 -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
Carlos Alberto Cortez 5dfe74e18d Rename DistributedContext to CorrelationContext (#757)
* Rename DistributedContext to CorrelationContext in the API/SDK.

* Update the OT shim.

* Fix build.
2020-01-15 13:40:12 -08:00
John Watson f6a27c7eee Change LabelSet creation to use varargs, rather than overloaded k/v methods. (#745)
* switch to varargs

* update the sdk to handle the varargs option

* format

* rename a variable to make more sense

* add back a test with 2 key/value pairs

* replace the emptyLabelSet method with the empty varargs call
2020-01-14 10:57:40 -08:00
John Watson 1ff2c2a3fb Create a labelset with an arbitrary number of key/value pairs (#740)
* add a method to create a labelset with an arbitrary number of labels.

* add notnull annotations

* rebase for SDK implementation

* remove Nonnull annotations
2020-01-10 09:58:00 -08:00
John Watson cd40a37156 remove some more usages of the bare word "bound" (#739) 2020-01-08 13:57:20 -08:00
John Watson eacd073205 convert the SpanContext to use Autovalue (#708)
* convert the SpanContext to be autovalued

* remove the builder for the span context and the custom equals/hashcode implementation

* format
2020-01-08 13:38:15 -08:00
John Watson 91053c45c8 rename the factories to registries (#725) 2020-01-06 20:11:02 -05:00
John Watson 47ed1b1808 more renaming of Metric to Instrument (#722) 2019-12-27 12:45:00 -08:00
John Watson 23cc506d26 Rename Metric to Instrument (#717)
* rename the Metric interface to Instrument, and update many javadocs to match

* apply formatting
2019-12-25 07:26:00 -08:00
John Watson fc9a9575c8 Add non bound usage to the various metric instruments API (#715)
* WIP on non-bound instrument usages

* Add API methods for non-bound-instrument usages

* add missing javadoc

* add some additional javadoc
2019-12-19 16:28:03 -08:00
John Watson a8d14d8886 provide an API method to return an empty LabelSet (#716)
* provide an API method for an empty LabelSet

* remove the TestLabelSet now that we have a way to create an empty one
2019-12-18 14:04:55 -08:00
John Watson 95da446cee rename metric instances to have the numeric type before the metric type (#712) 2019-12-18 11:38:24 -08:00
John Watson bc627e67cf Remove default bound (#707)
* remove the getDefaultBound methods

* provide a TestLabelSet for testing
2019-12-18 10:18:52 -08:00
John Watson 7505c1297f rename getBound/removeBound to bind/unbind (#704) 2019-12-16 16:06:22 -08:00
Bogdan Drutu f1e6fc6ef0
Simply rename metrics Handle to Bound. (#698)
* Simply rename metrics Handle to Bound.

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

* More renames in tests

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

* Rename Bound to Bound[ValueType][MetricType]

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

* Fix bound param comment

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-12-16 15:06:20 -08:00
Christian Neumüller 9afb1e4059 Javadoc: Tracer is not simple (#687) 2019-12-06 18:56:53 -06:00
Carlos Alberto Cortez 74c6595e67
Allow recording attributes in Span.Builder (#685)
* Initial support for attributes set in Span.Builder.
2019-12-05 12:49:17 -06:00
Bogdan Drutu 7ab95be319
Add LabelSet to the Meter API and change GetHandle to use it. (#681)
* Add LabelSet to the Meter API and change GetHandle to use it.

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

* Add clarification in LabelSet javadoc

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

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

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

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

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

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

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

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

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
2019-11-27 12:53:29 -08:00
Bogdan Drutu 1a3fefb2e9
Rename MeasureBatchRecorder to BatchRecorder to allow other types to be recorded. (#675)
* Rename MeasureBatchRecorder to BatchRecorder to allow other types to be recorded.

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

* ./gradlew goJF

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-11-17 09:32:09 -08:00
Peter Travers ffafe25d0a Add named meter and meter factory (#668)
* Add named meters with factory provider

* Fix documentation to instantiate a meter from a meter factory

* Fix documentation incorrectly referencing meter not meter factory

* Fix MeterFactor not Meter

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

* Fix MeterFactor not Meter

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

* Fix MeterFactory not Meter

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

* Fix over 100 characters in line

* Refactor meter example names to my_library_example
2019-11-13 13:25:54 -08:00
Armin Ruech 5e745481aa Add instrumentation library resource to named tracers (#632)
* Add instrumentation library resource to named tracers

* Introduce constants for library resource label keys

* Introduce InstrumentationLibraryInfo class to replace library resource
2019-10-31 12:53:45 -07:00
Carlos Alberto Cortez 25416034c3 Add explicit timestamp for Span events in the API. (#631) 2019-10-25 09:38:55 -07:00
Bogdan Drutu 9c207f7459
Set default binary propagator. (#630)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-24 19:16:07 -07:00
Bogdan Drutu c2f9168e8f
Move sampler to the SDK (#625)
* Move sampler to the SDK

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

* Fix javadoc

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

* Update sdk/src/main/java/io/opentelemetry/sdk/trace/config/TraceConfig.java

Co-Authored-By: Armin Ruech <armin.ruech@gmail.com>
2019-10-24 11:06:32 -07:00
Bogdan Drutu 0b21928db5
Add isRemote to the SpanContext (#626)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2019-10-24 08:22:55 -07:00
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