-
Notifications
You must be signed in to change notification settings - Fork 916
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
New agent instrumentation for Apache Sling #9469
base: main
Are you sure you want to change the base?
Conversation
@rombert could you also add tests for your instrumentation |
@rombert with cassandra there is no need to inject the agent into the image as we are testing cassandra client not the server. |
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.
Implementation looks good to me. I agree with @laurit tho and would like to see tests.
name = servlet.getServletConfig().getServletName(); | ||
} | ||
if (name == null || name.isEmpty()) { | ||
name = servlet.getServletInfo(); |
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 could see this as potentially surprising if it shows up as the "name", but I think it's fine. Hopefully more informative than just the class name when the name is missing from the config.
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 could've sworn that I found this pattern in the repository, but I can't find it anymore.
Thanks for the reviews @laurit and @breedx-splk . This is still on my to-do list but I did not manage to get back to it. Hopefully soon :-) |
@rombert are you still working on this? |
@jaydeluca - it's on my list, yes, but it gets pushed back by other priorities. I don't have a timeline for resuming work on it. |
I just rebased to the latest main branch. Still plan to look into adding tests. |
The new Apache Sling instrumentation ensures that top-level routes reflect the Sling Servlet (or script) handling the script and also that nested spans created by including components point to the right handler.
I've done extensive testing locally but since this is my first contribution there might be some rough edges. I'll add some screenshots to clarify what this looks like in practice.
Rendering with nested components
Rendering with top-level servlet