Skip to content

Commit 47f8e8c

Browse files
committed
Merge branch 'SF-6010'
2 parents e738805 + 72a56f0 commit 47f8e8c

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,31 @@ Add it as a maven dependency:
2626

2727
## Usage
2828

29+
30+
### RUM Manual Instrumentation
31+
32+
Real User Monitoring (RUM) manual instrumentation allows you to specify where the RUM JavaScript block is injected.
33+
34+
**Note**: Ensure that auto instrumentation is disabled by adding **rum.autoInstrument=false** to **stackify-api.properties** in your application's classpath.
35+
36+
Your application code will need to call out to the Stackify **getRUMJavaScriptBlock()** method in the `<head>` section as detailed below:
37+
38+
#### JSP Example
39+
40+
````
41+
<html>
42+
<head>
43+
<%= com.stackify.apm.Stackify.getRUMJavaScriptBlock() %>
44+
<script and link tags>
45+
</head>
46+
<body>
47+
...
48+
</body>
49+
</html>
50+
````
51+
52+
### @Trace Annotation
53+
2954
Add custom instrumentation to classes using the @Trace annotation. The annotation needs to be added to
3055
the class and the method to be instrumented. This is an alternative to adding a custom configuration
3156
file (stackify-apm.json) to your application.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.stackify.apm;
2+
3+
/**
4+
* Stackify Utility.
5+
* Provides function to manually instrument web requests for RUM tracking.
6+
*
7+
* @author Darin Howard
8+
*/
9+
public class Stackify {
10+
11+
/**
12+
* Returns the RUM JavaScript block for tracking the current web request
13+
*
14+
* @return String javascript script block
15+
*/
16+
public static String getRUMJavaScriptBlock() {
17+
return "";
18+
}
19+
20+
}

0 commit comments

Comments
 (0)