Make metric / log exporter closeable and improve behavior of some tests#4123
Merged
jkwatson merged 1 commit intoopen-telemetry:mainfrom Jan 26, 2022
Merged
Conversation
anuraaga
commented
Jan 26, 2022
| delay(10) | ||
| assertThat(Context.current().get(ANIMAL)).isEqualTo("cat") | ||
| for (i in 0 until 100) { | ||
| GlobalScope.launch { |
Contributor
Author
There was a problem hiding this comment.
Not sure why I used GlobalScope here but it was wrong, it starts a job in a new context meaning
- The ANIMAL is null, not cat
- the result is not collected into
runBlocking(so assertion failure was getting ignored)
Codecov Report
@@ Coverage Diff @@
## main #4123 +/- ##
============================================
- Coverage 90.21% 90.20% -0.02%
- Complexity 4506 4507 +1
============================================
Files 532 532
Lines 13824 13829 +5
Branches 1322 1322
============================================
+ Hits 12472 12474 +2
- Misses 919 922 +3
Partials 433 433
Continue to review full report at Codecov.
|
Contributor
Author
|
/easycla |
jsuereth
approved these changes
Jan 26, 2022
jack-berg
approved these changes
Jan 26, 2022
anuraaga
added a commit
to anuraaga/opentelemetry-java
that referenced
this pull request
Jan 28, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling output streams on tests shows some places that are not closing gRPC channels, returning
nullfrom FooExporter (which fails when putting into the SimpleSpanProcessor's pending task map), and incorrect kotlin coroutines usage.