Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak Guava WithSpan test pattern. #5744

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Apr 4, 2022

I was looking through the TracedWithSpan tests to potentially share logic and realized the pattern looks a bit weird to me. We pass in a future to the traced method, which is not a real-world pattern - indeed if the same future gets passed through multiple WithSpan methods the behavior is undefined. We don't expect that problem to happen in the real world (though maybe we do want to add some sort of detection / logging of this) but either way it would be good for the tests to match real world patterns better.

Will in another PR extract these tests into a shared location

@anuraaga anuraaga requested a review from a team April 4, 2022 08:13
static final IllegalArgumentException FAILURE = new IllegalArgumentException("Boom");

@WithSpan
SettableFuture<String> completable() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with this name expecting to extract an interface in a shared location

@trask trask merged commit 79cd093 into open-telemetry:main Apr 4, 2022
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants