Commit Graph

532 Commits

Author SHA1 Message Date
Christian Neumüller bbe8702257
Rename HttpTraceContext to W3CTraceContextPropagator. (#2116)
* Rename HttpTraceContext to W3CTraceContextPropagator.

* Add javadoc.
2020-11-25 10:27:07 +09:00
John Watson 3782def5dd
Add a static builder method to the OpenTelemetry interface. (#2118) 2020-11-24 09:22:15 -08:00
Anuraag Agrawal 96c7f404b4
Don't repeat Java 8 support among all the subproject READMEs and at top level, clarify that published artifacts are Java 8, but building requires additional instructions. (#2124) 2020-11-24 09:04:40 -08:00
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
Anuraag Agrawal 1828938263
Disallow null attribute array values. (#2105) 2020-11-21 09:28:58 -08:00
Anuraag Agrawal 0e013e5c73
Hide default context propagators implementation behind interface. (#2089)
* Hide default context propagators implementation behind interface.

* Deprecate

* Revamp
2020-11-20 10:58:34 +09:00
John Watson 96b480cd35
Deprecate the toBuilder methods on the OpenTelemetry classes, and add a method to set the propagators on an instance. (#2094) 2020-11-19 12:39:21 +09:00
Anuraag Agrawal a68b0bf864
Ignore invalid usage of TraceState instead of throwing. (#2084)
CHANGELOG: Invalid TraceState entries will now be ignored, rather than causing the entire TraceState to be invalidated.

* Ignore invalid usage of TraceState instead of throwing.

* Format

* Missed a test
2020-11-18 09:22:24 -08:00
Anuraag Agrawal 46408ef3fd
Don't throw exceptions for invalid baggage like other APIs (#1964)
* Don't throw exceptions for invalid baggage like other APIs

* Remove redundant null check

* Remove redundant null checks
2020-11-16 18:30:16 -08:00
John Watson 7a5d8df148
Make the OpenTelemetrySdk a subclass of DefaultOpenTelemetry (#2069)
* Make the OpenTelemetrySdk a subclass of DefaultOpenTelemetry

* Remove SPI from the explicit OpenTelemetrySdk builder usage.
Add a (super ugly) test to make sure that the clock and resource are getting set.

* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/all/src/test/java/io/opentelemetry/sdk/OpenTelemetrySdkTest.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* address code review comments; add tests

* Require the MeterProvider to be a MeterSdkProvider

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-11-16 16:06:43 -08:00
John Watson 1fe334ff12
Some cleanup in span land. (#2062)
CHANGELOG:  Deprecated the `getCanonicalCode` method on `SpanBuilder` ; replaced with `getStatusCode`

* Some cleanup in span land.
* Clean up the SpanBuilder javadoc to match the current APIs
* Scrub mentions of canonical status code
* Deprecate the getCanonicalCode method on SpanBuilder and replace with getStatusCode

* rename an internal method to make more sense

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

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

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

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

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

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>

* add tests for the deprecated method

Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
2020-11-11 18:34:07 -08:00
John Watson 58ccf97929
Switch the key/value pair sorting to mergesort, because it is stable (#2049) 2020-11-11 08:04:42 -08:00
Anuraag Agrawal b5efbcf187
Move builders to top level. (#1958)
* Move builders (and TraceStateEntry) to top level.

* Revert Entry

* Fix and more revert

* Drift
2020-11-10 14:50:37 +09:00
Anuraag Agrawal 1883c578bd
Add unit to start, end and event timestamp accepting methods in Span. (#1969)
* Add unit to timestamp accepting methods in Span.

* end timestamp

* Merge

* Merge

* Add Instant versions too
2020-11-09 16:19:52 -08:00
Anuraag Agrawal 9063c385d9
Implement baggage using array of key/value pairs instead of Map. (#2016)
* Implement baggage using array of key/value pairs instead of Map.

* Cleanup
2020-11-09 08:54:22 -08:00
Marius Volkhart 3e31fd91aa
Replace all assertions with AssetJ's assertThat (#2042)
* Replace all assertions with AssetJ's assertThat

Remove uses of JUnit 4 and JUnit 5 assert* where a functional equivalent exists in AssertJ. JUnit 5's assertThrows remains.

Fixes #1994

* fixup! Replace all assertions with AssetJ's assertThat
2020-11-07 14:48:00 -08:00
John Watson d69752a6be
Move the SPI interfaces to .spi.* packages (#2005) 2020-11-06 11:08:35 +09:00
Anuraag Agrawal 9c4c52dfee
Switch animal sniffer signature to gummy bears. (#2015) 2020-11-06 08:56:26 +09:00
Carlos Alberto Cortez 5195622181
Add Getter.Keys() with Jaeger Baggage support. (#1549) 2020-11-05 12:51:07 +01:00
Anuraag Agrawal 28905b7e05
Expose foreach consumer instead of Entry for baggage. (#1982) 2020-11-04 13:41:30 -08:00
Anuraag Agrawal 5be613a3f0
Replace EndSpanOptions.Builder with factory. (#1934)
* Replace EndSpanOptions.Builder with factory.

* create

* Remove class completely
2020-11-04 13:33:10 +09:00
Anuraag Agrawal e5cf181ed9
Expose foreach consumer instead of entries for trace state. (#1979)
* Expose foreach consumer instead of entries for trace state.

* o-public
2020-11-03 16:41:27 -08:00
Anuraag Agrawal 37cce8dbca
Replace LabelConsumer with BiConsumer (#1980) 2020-11-03 15:21:52 -08:00
Anuraag Agrawal 23392d9052
Make Attribute/LabelConsumer consistent with Java 8 BiConsumer (#1983)
* Make Attribute/LabelConsumer consistent with Java 8 BiConsumer

* more

* Spot
2020-11-03 10:03:52 -08:00
John Watson d958f2ba0c
Add a Jaeger exporter which exports via the thrift-over-http format (#1875)
* Initial implementation of a jaeger thrift exporter.

* some cleanups/renaming

* fix? the formatting

* Fix the default endpoint.

* Update exporters/jaeger_thrift/README.md

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update exporters/jaeger_thrift/README.md

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update exporters/jaeger_thrift/src/main/java/io/opentelemetry/exporters/jaeger/Adapter.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update exporters/jaeger_thrift/src/main/java/io/opentelemetry/exporters/jaeger/JaegerThriftSpanExporter.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* cleanup from PR review

* fix from upstream change

* add assertions about the results of the exports
and fix the code to make sure the results were included.

* update for api repackaging

* add some fuzzing tests for the id <-> long conversions

* change SpanId interface to match the TraceId one.

* Made a test method non-public

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-11-03 09:41:39 -08:00
Trask Stalnaker 4699191495
Add doc explaining the restriction on return type (#1977)
* Add doc explaining the restriction on return type

* In more places
2020-11-03 14:20:16 +09:00
Tyler Benson 9c446490af
Fix outdated javadoc (#1975) 2020-11-02 11:03:42 -08:00
Anuraag Agrawal 0e937d4c55
Use fine logging in w3c/b3 propagator instead of info. (#1966)
* Use fine logging in w3c propagator instead of info.

* Fine for b3 too
2020-11-02 07:47:11 -08:00
John Watson f034adb03b
Misc. cleanup: (#1942)
Rename TraceShim factory to OpenTracingShim
Remove factory method from OpenTracingShim which used mixed pieces of the openTelemetry components.
Made the constructor for W3CBaggagePropagator private.
Updated OpenTracingShim README
2020-10-31 13:42:00 -07:00
John Watson e581182147
Create classes to hold on to the context keys. (#1945)
Inline methods in TCU and get rid of it.
2020-10-31 08:47:37 -07:00
Anuraag Agrawal c723de5b05
Merge context_prop into context artifact. (#1928) 2020-10-31 08:47:07 -07:00
Anuraag Agrawal e8c6b1dac8
Remove BaggageUtils (#1931) 2020-10-30 11:25:12 -07:00
Anuraag Agrawal d430e11421
Add test cases for array attributes with null inside. (#1933) 2020-10-30 08:19:37 -07:00
Anuraag Agrawal c6f111a48d
Add comments to all package-private methods being used by auto-instrumentation. (#1930) 2020-10-29 20:42:43 -07:00
Anuraag Agrawal e6f6f19cc9
Remove BaggageManager for real. (#1929)
* Remove BaggageManager for real.

* Spot
2020-10-29 20:42:00 -07:00
John Watson 338acd4816
Add some simplistic fuzz-based tests for the 2 built-in W3C propagators. (#1926)
* Add some simplistic fuzz-based tests for the 2 built-in propagators.

* remove unused gradle plugin
2020-10-29 17:57:25 -07:00
Bogdan Drutu 972c89a2ef
Make BaggageUtils and TracingContextUtils package protected (#1923)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-29 14:05:51 -07:00
Bogdan Drutu da7ff3da20
Ensure all public classes in the API are final (#1924)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-29 14:05:29 -07:00
Anuraag Agrawal 604aee25fa
Have Baggage context interaction API mirror Span. (#1916) 2020-10-29 12:49:54 -07:00
Anuraag Agrawal 3d69aa19a8
Restore source/targetCompatibility declarations for intellij to set version correctly and remo… (#1920)
* Restore source/targetCompatibility declarations for intellij and remove animalsniffer for java 8.

* Newer syntax
2020-10-29 08:11:15 -07:00
Anuraag Agrawal ba1fabeb64
Hide Default* implementations behind interface factory methods. (#1904)
* Hide Default* implementations behind interface factory methods.

* Renames
2020-10-29 08:02:44 -07:00
Anuraag Agrawal 34953d5fee
Add MustBeClosed to Context.makeCurrent (#1914) 2020-10-29 11:36:46 +09:00
John Watson ed75175578
Add a method to the Baggage interface to return the current baggage in the context (#1913)
* Add a method to the Baggage interface to return the current baggage in the context.

* formatting

* Fix tests broken by not clearing state

* don't try to code while overly tired. the result is scopes that aren't closed.

* remove the scope to make sure the root scope has no baggage
2020-10-29 11:07:08 +09:00
Anuraag Agrawal f83b9e4842
Remove leftover baggage spi package-info and add baggage propagation missing package-info. (#1905) 2020-10-28 07:34:04 -07:00
Anuraag Agrawal 7ebbe7979d
Move API packages to .api. package (#1892)
* Move API packages to .api. package

* Cleanup
2020-10-28 08:39:41 +09:00
Anuraag Agrawal 934c9ed8a3
Make OpenTelemetrySdk implement the OpenTelemetry interface and have SPI find it. (#1857) 2020-10-24 19:39:26 -07:00
Anuraag Agrawal a8975e83d4
Replace TracingContextUtils.currentContextWith with ImplicitContextKeyed.makeCurrent (#1855)
* Replace TracingContextUtils.currentContextWith with ImplicitContextKeyed.makeCurrent

* Dont add MustBeClosed this time since affects other code.
2020-10-24 19:38:24 -07:00
dengliming a4e23f9ed9
Span return `this` to enable chain calls (#1869)
* Span return `this` enable chain calls

* Fix spotlessCheck

* Keep return void in end method
2020-10-23 09:29:01 -07:00
Giovanni Liva d0785ff84f
Automatically generate Semantic Convention attributes (#1846)
* Automatically generate Semantic Convention attributes

* Fix checkstyle

* Transition to automatically generated class

* Pin to specific commit

* Move EXCEPTION_EVENT_NAME inside the template
2020-10-23 09:00:42 -07:00
John Watson e2f648da63
Add a toBuilder method to the Baggage (#1868)
* Add a toBuilder method to the Baggage to make it easy to amend baggage.

* formatting
2020-10-23 07:49:33 -07:00