Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,24 @@ file (stackify-apm.json) to your application.
name can be a `String` and can also include the variables `{{ClassName}}`, `{{MethodName}}` and `{{MethodParameters[#]}}`
(where `#` is an `int` referencing the parameter index on the annotated method, index starts at 0).

#### Custom Trace Entry Point
Stackify by default generates traces from web-requests on [supported application servers](http://support.stackify.com/hc/en-us/articles/209709913-What-Java-Application-Containers-and-Frameworks-are-Supported-)
and non-web-requests from [supported frameworks](http://support.stackify.com/hc/en-us/articles/209709913-What-Java-Application-Containers-and-Frameworks-are-Supported-).
You can extend support by using `@Trace(start = true)` on a method; which will start a new trace.

```
import com.stackify.apm.Trace;

@Trace
public class ClassToBeInstrumented
{

@Trace(start = true)
public void methodToStartNewTrace()
{
...
}

@Trace
public void methodToBeInstrumented()
{
Expand Down Expand Up @@ -77,7 +88,7 @@ public class ClassToBeInstrumented

## License

Copyright 2016 Stackify, LLC.
Copyright 2017 Stackify, LLC.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 12 additions & 4 deletions src/main/java/com/stackify/apm/Trace.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 Stackify
* Copyright 2017 Stackify
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,6 +35,13 @@
* {@literal @}Trace
* public class ClassToBeInstrumented
* {
*
* {@literal @}Trace(start = true)
* public void methodToStartNewTrace()
* {
* ...
* }
*
* {@literal @}Trace
* public void methodToBeInstrumented()
* {
Expand Down Expand Up @@ -90,9 +97,10 @@
String trackedFunctionName() default "";

String category() default "Java";

String subcategory() default "Other";

boolean action() default false;


boolean start() default false;
}