Commit Graph

75 Commits

Author SHA1 Message Date
Bogdan Drutu 25bf879df7
Split global functionality into a separate class (#2233)
This ensure clear separation of functionality. This PR does not change any functionality, it just restructures the code to separate global functionality from
the Default implementation. Also helps to ensure that Global initialization does not happen by mistake when working only with the default implementation.

Also it helps with methods like `OpenTelemetry.get()` and `OpenTelemetry.set()` to understand they are interacting with global instance

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-15 10:27:35 -08:00
Anuraag Agrawal e802b8ab35
Detect invalid use of makeCurrent in Kotlin coroutine. (#2227)
* Detect invalid use of makeCurrent in Kotlin coroutine.

* Fix and check suspending function too.

* Newline

* Doc

* Some comments

* teency
2020-12-15 15:09:34 +09:00
dengliming acd063c302
Fix comment and remove import (#2300) 2020-12-14 11:55:35 -08:00
jason plumb 5e891ccad9
make imports consistent with other files in this package. (#2280) 2020-12-11 15:38:42 -08:00
Prashant Srivastava f88e207f09
Adding instructions to run benchmarks (#2271)
* benchmark readme for opentelemetry-sdk

* benchmark instructions for all the modules

* Fixing typo
2020-12-11 14:40:16 +09:00
jason plumb 6af53c226d
Update README for extensions propagators (#2207)
* Update README for extensions propagators for #2067.

* OpenTracing -> LightStep OpenTracing

* Update extensions/trace-propagators/README.md

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

* b3 and jaeger are supported here.

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-12-09 11:42:31 -08:00
Bogdan Drutu 3341c37701
Remove deprecated code from trace propagation extension (#2234)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-08 16:52:40 -08:00
Anuraag Agrawal eda9518052
Remove deprecated runtime-metrics and trace-utils packages. (#2226)
* Remove deprecated runtime-metrics and trace-utils packages.

* Remove from all

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-08 12:53:08 -08:00
Anuraag Agrawal 5cb2057992
Deprecate trace-utils (#2168)
* Deprecate trace-utils

* Suppress deprecation

* Update extensions/trace-utils/src/main/java/io/opentelemetry/extension/trace/CurrentSpanUtils.java

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Reference SA

* README

* error prone sigh

* Spot

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
2020-12-02 11:05:01 -08:00
Anuraag Agrawal f8b9f0ac6a
Expose BaggageEntry / Metadata as interfaces and add asMap (#2177)
* Expose BaggageEntry / Metadata as interfaces and add asMap

* Disclaimer
2020-12-02 10:40:46 -08:00
Prashant Srivastava 6f5a9dc72a
Adding micro-benchmarks for inject and extract methods of AwsXRayPropagator (#2173) 2020-12-01 22:22:29 -08:00
Chris Burns e0989d75e7
Changes return type from List to Collection (#2156)
- changes the return type of the fields() method in TextMapPropagator from List<String> to Collection<String>
and updated all implementations for consistency
2020-11-30 14:26:24 -08:00
John Watson 73bad773dd
Move the AsynchronousInstrument callbacks to the builders. (#2120)
Deprecate the existing setCallback method.
Update the code in the SDK to use the new API.
2020-11-30 14:12:49 -08:00
Anuraag Agrawal 0da7eeca66
Remove Java 8 animalsniffer because we use -release flag (#2153) 2020-11-30 08:53:41 -08:00
Anuraag Agrawal 0c4a0dff02
Add factory methods instead of builder for TraceMultiPropagator (#2104)
* Add factory methods instead of builder for TraceMultiPropagator

* spot
2020-11-25 10:38:09 +09:00
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 116238f001
Deprecate the runtime-metrics code. (#2119) 2020-11-24 09:10:03 -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
dengliming d1d5808c24
Rename the package for WithSpan annotation (#2090)
CHANGELOG: Breaking Change - the `@WithSpan` annotation has been moved to the `io.opentelemetry.extension.annotations` package in the `opentelemetry-extension-annotations` module .
2020-11-18 08:56:44 -08:00
Devin Smith 42483b5726
Fix memory pool metrics (#2075) 2020-11-16 08:29:52 -08:00
Anuraag Agrawal 8923bc3687
Disable javadoc task for kotlin project since there isn't any. And have CI build instead of check. (#2074) 2020-11-13 08:34:12 -08:00
Anuraag Agrawal 606c9c11f3
Merge pull request #2066
* Add kotlin extension for interaction with Context in coroutines.

* Newline

* ImplicitContextKeyed not span

* Fix doc

* Cleanup
2020-11-13 12:25:12 +09:00
jarebudev d4583db62f
1911 b3 propagator debug flag (#2038)
CHANGELOG: Added support for propagating the B3 debug flag

* b3 propagator supports inject/extract of debug flag

* rename context key

* Update extensions/trace-propagators/src/main/java/io/opentelemetry/extension/trace/propagation/B3Propagator.java

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

* changes as per code review comments

* added constants for b3propagator debug propagation

* tidy up

* changed b3 propagator to store a boolean in context

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-11-12 08:15:59 -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 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
John Watson 392e55bf98
Add the combined b3 header to the propagator fields (#2008) 2020-11-04 14:37:48 -08:00
Bogdan Drutu 3014bb7fa0
Rename package name for extensions to singular extension (#1995)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 18:23:31 -08:00
Anuraag Agrawal 390d92e49a
Rename folder names from underscore to hyphen (#1968) 2020-11-03 14:46:40 +09: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
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 42a99c78dd
Replace mock with spy in CurrentSpanUtilsTest. (#1876) 2020-10-25 11:36:24 -07:00
Anuraag Agrawal ed5136bcda
Move Span context accessors to Span static methods. (#1843)
* Move Span context accessors to Span static methods.

* Bad IDE

* More merge

* More merge
2020-10-21 20:02:58 -07:00
Anuraag Agrawal f5082d10f6
Context.with/get, AttributesBuilder/LabelsBuilder.set (#1838)
* Context.with, AttributesBuilder/LabelsBuilder.set

* put
2020-10-21 19:51:14 -07:00
Anuraag Agrawal 34e66a1175
Rename getContext to getSpanContext. (#1852) 2020-10-21 19:38:08 -07:00
Anuraag Agrawal ea1a0a0486
Rename OpenTelemetry interface methods to normal interface conventions. (#1842) 2020-10-21 19:21:57 -07:00
Anuraag Agrawal ecdfc391f2
Add a ContextValue interface to allow Context.withValue(value) withou… (#1827)
* Add a ContextValue interface to allow Context.withValue(value) without a key.

* Assertions

* Renames
2020-10-20 19:26:54 -07:00
Christian Neumüller 9b73fb06fd
Fix non-null carrier not working in extract. (#1835) 2020-10-19 13:07:02 -07:00
John Watson 57097873c8
rename StatusCanonicalCode to StatusCode (#1804) 2020-10-15 17:55:05 -07:00
Anuraag Agrawal 2d0f91b538
Remove DefaultSpan from public API. (#1791)
* Cleanup

* Fix comment

* isValid not valid
2020-10-15 11:37:03 +09:00
Anuraag Agrawal 0ceff17dfa
Remove since tags until 1.0.0 (#1796)
* Remove since tags until 1.0.0

* Spotless
2020-10-14 09:29:27 -07:00
Anuraag Agrawal e2b5245d73
Rename newBuilder to builder for consistency. (#1790) 2020-10-13 13:17:06 -07:00
jarebudev 05646477a8
changed B3Propagator to default to inject/extra single header (#1775)
* changed B3Propagator to default to inject/extra single header, and allow multiple headers to be injected by creating propagator via a builder

* changed to return Optional instead of null from B3PropagatorExtractor

* tidy up method name in B3Propagator builder
2020-10-12 15:23:28 -07:00
Anuraag Agrawal 78fd4d1c8f
Add package-info.java to all packages and ParamatersAreNonNullByDefault. (#1772) 2020-10-08 08:26:49 -07:00
Anuraag Agrawal fd49b3f65f
Migrate usage of gRPC context to OTel context. (#1751) 2020-10-07 11:19:49 -07:00
Anuraag Agrawal ed169645f7
Migrate to spotless (#1748)
* Use spotless for formatting / license check

* Apply formatting

* README

* Apply to example

* google-java-format 1.8 for now

* google-java-format 1.7 for now (last supporting Java 8)
2020-10-05 16:41:21 +09:00
Bogdan Drutu eb4a18febc
Remove Status object from API, keep StatusCanonicalCode (#1741)
* Remove Status object from API, keep StatusCanonicalCode

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

* Respond to comments, change more old usages

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

* Fix build, run gojf

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-10-05 11:33:40 +09:00
Ioannis Mavroukakis 42cdff446c
subsume methods from AttributesKeys to AttributeKey (#1743)
* subsume methods from AttributesKeys to AttributeKey

* remove missed instance of AttributesKeys

* make javadoc wording more representative of method intent
2020-10-04 10:41:37 -07:00
dengliming 71ba8e1b87
Use the concise license header without the year (#1623)
* Use the concise license header without the year

* Use the concise license header without the year
2020-10-02 22:42:53 +09:00