Commit Graph

73 Commits

Author SHA1 Message Date
Mateusz Rzeszutek 6be22eeaa5
Bump spotless version (#4667) 2022-08-05 11:18:54 -05:00
jason plumb 83bfb84d14
Migrate to assertj (#4512)
* migrate from junit/jupiter assertions to assertj in a few remaining places.

* reorder
2022-06-02 13:38:46 -07:00
Anuraag Agrawal e999fa0d5a
Some fixes for compilation under java 18 (#4397) 2022-04-22 07:43:55 +09:00
Trask Stalnaker cd2583df6a
Add misspell check (and fix misspellings) (#4290)
* Add misspell check

* Fix misspellings

* Spotless
2022-03-22 15:12:40 +09:00
Anuraag Agrawal cffbd3249c
Add context wrapping methods for arguments found in CompletableFuture APIs. (#4154) 2022-02-10 08:09:36 +09:00
Lauri Tulmin 9c6cc22fb6
Javadoc code snippets use methods that don't exist (#4140)
* Replace OpenTelemetry with GlobalOpenTelemetry in javadoc code snippets

* use openTelemetry instread of GlobalOpenTelemetry

* replace one ome usage of GlobalOpenTelemetry
2022-02-02 12:20:36 -08:00
Anuraag Agrawal 47f7c38ef5
Enable loggers in all tests via slf4j. (#4126)
* Route all test jul logging through slf4j.

* Cleanup and more suppressions
2022-02-02 14:43:25 +09:00
jack-berg 7c9234e1ae
Add missing internal disclaimers (#4086) 2022-01-13 14:00:12 -08:00
Anuraag Agrawal dfb4a74ac5
Update errorprone (#4048) 2022-01-06 11:33:00 +09:00
Anuraag Agrawal 8e04fbf0b8
Migrate most testsets to test suites. (#3953) 2021-12-07 08:37:15 +09:00
Anuraag Agrawal c143a59517
Migrate test sets in context module to new test suites. (#3788) 2021-10-26 10:39:06 +09:00
jack-berg 4a945e63e3
Add gradle ktlint spotless config to all projects (#3543) 2021-08-25 08:36:17 +09:00
jack-berg 58c16a9133
Add missing readmes and missing javadoc links (#3500) 2021-08-16 12:36:54 -07:00
Anuraag Agrawal 6671bcf495
Delete duplicate test (#3479) 2021-08-13 09:46:04 -07:00
Trask Stalnaker 60c3c5ca0c
Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
wesleyhillyext 0d2b7b03b7
Allow root Context to be overridden (#3230)
* Allow root Context to be overridden

Adds ContextStorage.root() to provide a way to customize the
implementation of the root Context when you don't want the
root to be an ArrayBasedContext.

* Update context/src/main/java/io/opentelemetry/context/ContextStorage.java

Co-authored-by: Anuraag Agrawal <aanuraag@amazon.co.jp>
Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2021-07-21 16:13:56 -07:00
Anuraag Agrawal ce9c8854c7
Extract publishing and animalsniffer plugins. (#3334) 2021-06-22 08:23:16 +09:00
Anuraag Agrawal 864508983e
Extract JMH conventions plugin. (#3324) 2021-06-17 08:37:49 -07:00
Anuraag Agrawal 7f544416e4
Define an extension for otel-specific configuration of Java. (#3317) 2021-06-17 15:54:25 +09:00
Anuraag Agrawal b9ca09b6c1
Extract java conventions plugin. (#3316) 2021-06-15 12:29:47 -07:00
Will Sargent 6f1a4537d3
Change context.getKey to context.get (#3268)
There is no `getValue` in the `Context` interface
2021-05-30 21:19:33 -07:00
Anuraag Agrawal 672330bf51
Upgrade to Gradle 7.0 (#3228) 2021-05-13 08:21:22 +09:00
Anuraag Agrawal 77f0b0adc4
Allow enabling nullaway and fix some nullness issues (#3218)
* Add support for enabling nullaway and fix a couple of projects.

* Finish

* Finish

* Cleanup
2021-05-12 08:43:32 +09:00
Anuraag Agrawal 0b8131c79e
Handle nulls in noop / multi (#2939)
* Handle nulls in noop / multi

* Remove old file
2021-05-06 20:49:39 -07:00
John Watson bd6cfd85fb
Add a task to compare public APIs for every stable module. (#3183)
* Add a task to compare public APIs for every stable module.

* add a few comments and make the build task depend on the japicmp task

* update the api diffs after rebasing.

* task must depend on jar

* a few script tweaks based on feedback

* small tweak to make it a little more kotlin-idiomatic

* refactoring to make the code more clear

* some more refactoring.

* make the latest released version a lazy val of the build script

* have the task depend on check, rather than build

* put all the API diffs into a central directory

* run at --info to diagnose CI issues

* try an older java 11 version

* try another combo

* remove the info logging
2021-05-06 17:49:49 -07:00
John Watson a8a85c6129
Add tests and update behavior to verify propagators do not alter the … (#3194)
* Add tests and update behavior to verify propagators do not alter the context when failing to parse inputs.

* Ad a couple tests around null contexts

* formatting
2021-05-07 08:58:42 +09:00
Christian Neumüller f64ec29f92
Fix leftover occurence of Span.Kind (#3064) 2021-03-26 22:03:01 +09:00
Anuraag Agrawal 691e24fc19
Add static wrappers for Executor / ExecutorService using current cont… (#2988)
* Add static wrappers for Executor / ExecutorService using current context at invocation time.

* Missing javadoc

* Cleanup

* taskWrapping
2021-03-15 11:56:13 +09:00
Anuraag Agrawal 62cfc060d3
Keep reference to leaked scope to make sure GC detection doesn't kick in first. (#2972) 2021-03-03 07:52:07 -08:00
Anuraag Agrawal f967b0a95b
Move api/context to context. (#2959)
* Move api/context to context.

* git commit
2021-03-02 10:44:27 -08:00
Bogdan Drutu 26124ad075
Split API packages, move context in the same directory (#2199)
There are some things left to be done:
* Decide if context package should also be opentelemetry-api-context.
* Cleanup internal packages, things that are used by only one artifact should be moved there.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-12-05 08:33:20 -08:00
Anuraag Agrawal 8697de9afa
Detect GC leaks of scopes in StrictContextStorage. (#2164)
* Detect GC leaks of scopes in StrictContextStorage.

* More

* Finish

* Force GC more aggressively

* Cleanup

* Vendor code directly

* Copy test too

* Try waiting more

* ep

* oops

* Remove from build.gradle

* Drift

* Log on multiple

* Cleaner ourselves.

* EP

* Move into if

* Revert accidental
2020-12-04 13:04:27 +09:00
Anuraag Agrawal b8a868f7db
Have Node itself implement Context to remove wrapper object. (#2165) 2020-12-01 11:00:01 -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
Anuraag Agrawal ebd35d0b14
Add some more coverage of context code paths. (#2131) 2020-11-25 10:42:40 -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
Anuraag Agrawal ac672e56bf
Update dependencies (#2115) 2020-11-21 09:39:27 -08:00
John Watson 7f4396219e
add a couple of context tests around keys with colliding hashcodes (#2114)
* add a couple of context tests around keys with colliding hashcodes

* add a test for an empty context
2020-11-21 09:29:47 -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
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
Anuraag Agrawal 220d6d83d7
Allow registering ContextStorage wrappers with code to avoid requirin… (#2044)
* Allow registering ContextStorage wrappers with code to avoid requiring SPI for listening to events.

* Mutex
2020-11-12 12:51:20 -08:00
dengliming 33db03bc05
Add a way to enforce default context storage implementation (#2039)
* Add a way to enforce default context storage implementation

* Fix review

* Add testcase

* Use junit_pioneer

* Change the methods to be package-private

* Add some comments

* Remove DefaultContext.threadLocalStorage

* Fix review
2020-11-10 11:09:29 -08: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
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
Bogdan Drutu add99ac946
Add test for otel in brave (#1888)
* Add test for otel in brave

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

* Ensure all propagation works

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

* Fix nullpointer exception

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-11-03 12:00:46 +09:00
Anuraag Agrawal 95fa0eae4d
Add a StrictContextStorage which keeps track of scope open / close to… (#1938)
* Add a StrictContextStorage which keeps track of scope open / close to throw errors when it's incorrect for tests.

* Separate out SettableContextStorageProvider

* Check noop too

* Update sdk/testing/src/main/java/io/opentelemetry/sdk/testing/context/StrictContextStorage.java

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>

Co-authored-by: Nikita Salnikov-Tarnovski <gnikem@gmail.com>
2020-11-03 10:11:37 +09:00
HaloFour b083bc7e76
Documents that ContextStorage.current can return null (#1974)
* Fixes ThreadLocalContextStorage to return root Context if not set on current thread

* Kick CI

* Change docs on ContextStorage.current to indicate that it can return null

* Kick CI
2020-11-02 12:56:01 -08:00
Anuraag Agrawal c723de5b05
Merge context_prop into context artifact. (#1928) 2020-10-31 08:47:07 -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