You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,17 @@ Add it as a maven dependency:
26
26
27
27
## Usage
28
28
29
-
Add custom instrumentation to classes using the @Trace annotation. The annotation needs to be added to the class and the method to be instrumented. This is an alternative to adding a custom configuration file (stackify-apm.json) to your application.
29
+
Add custom instrumentation to classes using the @Trace annotation. The annotation needs to be added to
30
+
the class and the method to be instrumented. This is an alternative to adding a custom configuration
31
+
file (stackify-apm.json) to your application.
32
+
33
+
34
+
#### Tracked Functions
35
+
***trackedFunction** marks a specific method as a tracked function.
36
+
***trackedFunctionName** gives control over how the tracked function will be identified in the dashboard. The function
37
+
name can be a `String` and can also include the variables `{{ClassName}}`, `{{MethodName}}` and `{{MethodParameters[#]}}`
38
+
(where `#` is an `int` referencing the parameter index on the annotated method, index starts at 0).
39
+
30
40
31
41
```
32
42
import com.stackify.apm.Trace;
@@ -45,7 +55,19 @@ public class ClassToBeInstrumented
45
55
{
46
56
...
47
57
}
48
-
58
+
59
+
@Trace(trackedFunction = true, trackedFunctionName = "Tracked Function Identifier")
60
+
public void anotherMethodToBeInstrumentedAndMarkedAsTrackedFunction()
61
+
{
62
+
...
63
+
}
64
+
65
+
@Trace(trackedFunction = true, trackedFunctionName = "Tracked Function {{ClassName}} - {{MethodParameters[0]}}")
66
+
public void anotherMethodToBeInstrumentedAndMarkedAsTrackedFunctionVariable(String value)
0 commit comments