-
Notifications
You must be signed in to change notification settings - Fork 913
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
try to handle issues in Pekko tracing when the scheduler is used #12359
Conversation
...pentelemetry/javaagent/instrumentation/pekkoactor/v1_0/PekkoScheduleOnceInstrumentation.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/ExecutionContextWrapper.java
Outdated
Show resolved
Hide resolved
...java/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/ExecutionContextWrapper.java
Outdated
Show resolved
Hide resolved
@@ -32,4 +39,23 @@ class PekkoHttpServerInstrumentationTestAsync | |||
super.configure(options) | |||
options.setTestHttpPipelining(false) | |||
} | |||
|
|||
@Test | |||
def successfulPostRequestWithParent(): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test name indicates that you are testing something completely different than what your true goal is. Test should be name appropriately. Parts that you don't need should be removed, do you really need the tracePARENT
stuff? Why not send a simple get? I'd guess that for what you want to test you don't need to make a http request at all, perhaps you could skip that altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into rewriting this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laurit thanks for looking at the PR so quickly. I wrote a new test that does not use HTTP.
...st/scala/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/PekkoSchedulerTest.scala
Outdated
Show resolved
Hide resolved
...st/scala/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/PekkoSchedulerTest.scala
Outdated
Show resolved
Hide resolved
class names add tests Update PekkoScheduleInstrumentation.java fix matcher ExecutionContextWrapper Update PekkoHttpTestAsyncWebServer.scala extend test remove ExecutionContextWrapper remove PekkoScheduleOnceInstrumentation Create PekkoSchedulerTest.scala remove new http test spotless Update PekkoSchedulerTest.scala
779e207
to
f8f82f9
Compare
Relates to #11755
The code is based on @wsargent 's workaround in https://github.com/wsargent/opentelemetry-with-scala-futures and includes the test submitted by @Dogacel