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

JSP v3 Tag library instrumentation for RUM script injection #1943

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

jtduffy
Copy link
Contributor

@jtduffy jtduffy commented Jun 12, 2024

Resolves #1695

Injection of the Real User Monitoring Script Via JSP Tag Libraries

Prior to the additions to this instrumentation module, the only way to inject the RUM script into JSPs was during the
compilation phase of the Jasper compiler, which injects the script into the HTML <head> element, if present in the page
source.

Some applications use custom JSP tag libraries to create the head tag (and other HTML page elements). In this scenario, the RUM script will not be injected because of the way the Jasper compiler instrumentation detects the head tag. This
instrumentation module weaves the SimpleTagSupport and TagSupport classes to detect the creation of head elements via the tag execution and inject the RUM script at that time.

See the included README for more information.

@jtduffy jtduffy requested a review from a team June 12, 2024 13:45
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.81%. Comparing base (1082ec6) to head (a4ca754).
Report is 414 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1943      +/-   ##
============================================
- Coverage     70.66%   69.81%   -0.85%     
+ Complexity     9858     9757     -101     
============================================
  Files           826      826              
  Lines         39804    39792      -12     
  Branches       6062     6061       -1     
============================================
- Hits          28127    27781     -346     
- Misses         8951     9329     +378     
+ Partials       2726     2682      -44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtduffy jtduffy merged commit 3fea0e5 into main Jun 13, 2024
111 checks passed
@jtduffy jtduffy deleted the jsp-tag-instru branch June 13, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Browser auto instrumentation through java agent on jsps without head and footer tags
3 participants