Service name discovery based on webapp manifest#2434
Service name discovery based on webapp manifest#2434felixbarny merged 10 commits intoelastic:mainfrom
Conversation
- Refactoring of servlet plugin
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
|
@tobiasstadler would you be able to try this out? |
|
Sure, should I test anything specific? |
|
I'd appreciate feedback on these scenarios in particular:
|
|
I've added integration tests and they're passing now 🎉
The |
|
/test |
|
This is how to properly set the manifest entries so that the agent can discover the <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<!-- uncomment if you're building a jar
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
-->
<!-- uncomment if you're building a war
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
-->
<configuration>
<archive>
<!-- Adds
Implementation-Title based on ${project.name} and
Implementation-Version based on ${project.version}
-->
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<!-- To customize the Implementation-* entries, remove addDefaultImplementationEntries and add them manually
<manifestEntries>
<Implementation-Title>foo</Implementation-Title>
<Implementation-Version>4.2.0</Implementation-Version>
</manifestEntries>
-->
</archive>
</configuration>
</plugin>
</plugins>
</build> |
|
@SylvainJuge review hints: Start with |
SylvainJuge
left a comment
There was a problem hiding this comment.
LGTM, changed a few bits for proper coverage of ServiceInfo
It will look at it it on the weekend |
|
Here are my results on JBoss EAP:
I have one application that uses Spark Java which (ab)uses Servlet Filters. Fortunately Overall I think it is an improvement, but not the way I would like it to be. So I will stay with my customer WildFly/JBoss instrumentation at the moment. |
|
@felixbarny I implemented |
|
@felixbarny I implemented |
What does this PR do?
Discovers the service name based on
servletContext.getResource("/META-INF/MANIFEST.MF")Open questions
/META-INF/MANIFEST.MF? DoesservletContext.getResource("/META-INF/MANIFEST.MF")return the manifest of a jar in thelibdirectory?Checklist
cc @tobiasstadler