-
Notifications
You must be signed in to change notification settings - Fork 891
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
Instrument jsf action calls #2018
Conversation
instrumentation/jsf/jsf-testing-common/src/main/resources/test-app/WEB-INF/web.xml
Outdated
Show resolved
Hide resolved
...common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/JsfTracer.java
Outdated
Show resolved
Hide resolved
...common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/JsfTracer.java
Outdated
Show resolved
Hide resolved
...common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/JsfTracer.java
Outdated
Show resolved
Hide resolved
...nt/src/main/java/io/opentelemetry/javaagent/instrumentation/mojarra/ProcessActionAdvice.java
Outdated
Show resolved
Hide resolved
...nt/src/main/java/io/opentelemetry/javaagent/instrumentation/mojarra/ProcessActionAdvice.java
Outdated
Show resolved
Hide resolved
...in/java/io/opentelemetry/javaagent/instrumentation/mojarra/MojarraInstrumentationModule.java
Outdated
Show resolved
Hide resolved
...common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jsf/JsfTracer.java
Outdated
Show resolved
Hide resolved
...in/java/io/opentelemetry/javaagent/instrumentation/myfaces/MyFacesInstrumentationModule.java
Outdated
Show resolved
Hide resolved
...mon/src/main/groovy/io/opentelemetry/instrumentation/test/base/AbstractHttpServerTest.groovy
Outdated
Show resolved
Hide resolved
...mon/src/main/groovy/io/opentelemetry/instrumentation/test/base/AbstractHttpServerTest.groovy
Outdated
Show resolved
Hide resolved
instrumentation/jsf/jsf-testing-common/src/main/groovy/BaseJsfTest.groovy
Outdated
Show resolved
Hide resolved
instrumentation/jsf/jsf-testing-common/src/main/groovy/BaseJsfTest.groovy
Outdated
Show resolved
Hide resolved
…emetry/javaagent/instrumentation/mojarra/ProcessActionAdvice.java Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
…retry on address use logic to trait
…ompilation failures
...va/io/opentelemetry/javaagent/instrumentation/myfaces/ActionListenerImplInstrumentation.java
Outdated
Show resolved
Hide resolved
instrumentation/jsf/jsf-testing-common/src/main/groovy/BaseJsfTest.groovy
Outdated
Show resolved
Hide resolved
} | ||
|
||
dependencies { | ||
library group: 'org.apache.myfaces.core', name: 'myfaces-impl', version: '2.3.7' |
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.
Right now we have a myfaces-1.2 module that tests version 2+ and a separate 1.2 testing module. Wouldn't it make more sense to keep 1.2 testing in the myfaces-1.2 module and have a separate one for 2+ tests?
Also, have you considered using a separate test task for 2+ tests instead of a separate module? Like jms2Test
in the JMS instrumentation.
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.
Yeah, this turned out weird. I initially wanted to add integration with only 2.2 and 2.3 but as it turned out to also work for 1.2 I changed the version number to 1.2, but i still wanted to use latestDepTestLibrary to test latest version from 2.x series. As 1.2 & 2.2 have a bit different dependencies I suspect that putting them in one module will make getting them to run with correct dependencies tricky.
instrumentation/jsf/jsf-testing-common/src/main/groovy/BaseJsfTest.groovy
Outdated
Show resolved
Hide resolved
…ntelemetry/javaagent/instrumentation/myfaces/ActionListenerImplInstrumentation.java Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
withRetryOnAddressAlreadyInUse(closure, 3) | ||
} | ||
|
||
static void withRetryOnAddressAlreadyInUse(Closure<?> closure, int numRetries) { |
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.
We already have three retry mechanisms available, gradle-retry-plugin, spock @Retry
, and the GitHub actions workflow retry, would be great if we can avoid yet another retry mechanism.
Is it possible to use lazy-loaded singletons instead to take advantage of gradle-retry-plugin?
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.
This is not new code, it was extracted from AgentTestRunner as @mateuszrzeszutek suggested. Anyway ideally such retry should not be needed. To me it seems that for this retry to happen the port returned from PortUtils.randomOpenPort
is either not usable (for example PortUtils.randomOpenPort
uses socket.setReuseAddress(true);
but if server does not then I guess server could fail to bind to that port) or someone else managed to pick the exact same port. It would be best to have each test worker to have its own separate port range that excludes ephemeral ports. Something like https://github.com/gradle/gradle/blob/master/subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/FixedAvailablePortAllocator.groovy As this is not a new issue I would prefer for it to be worked on in a separate pr.
// wait for thread to start, we expect the first span to be from receive | ||
countDownLatch.await() |
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.
👍
// JSF spec 7.6.2 | ||
// view id is a context relative path to the web application resource that produces the view, | ||
// such as a JSP page or a Facelets page. |
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.
👍
<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd"> | ||
|
||
<!-- without this response status is 200 even when there is an exception --> |
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.
👍
No description provided.