diff --git a/README.md b/README.md index d1745bc..fa91d45 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Stackify APM+ Overview: -http://support.stackify.com/hc/en-us/categories/200398749-APM- +http://support.stackify.com/agent-installation-overview/ Sign Up for a Trial: @@ -31,11 +31,16 @@ Add it as a maven dependency: Real User Monitoring (RUM) manual instrumentation allows you to specify where the RUM JavaScript block is injected. -**Note**: Ensure that auto instrumentation is disabled by adding **rum.autoInstrument=false** to **stackify-api.properties** in your application's classpath. +It is recommended you provide a `stackify-api.properties` file in your application classpath with the following content: -Your application code will need to call out to the Stackify **getRUMJavaScriptBlock()** method in the `` section as detailed below: +```` +stackify.application=My Application Name +stackify.environment=My Environment Name +```` + +Your application code will need to call out to the Stackify `com.stackify.apm.Stackify.getRUMJavaScriptBlock()` method in the `` section as detailed below: -#### JSP Example +**JSP Example** ```` @@ -49,6 +54,7 @@ Your application code will need to call out to the Stackify **getRUMJavaScriptBl ```` + ### @Trace Annotation Add custom instrumentation to classes using the @Trace annotation. The annotation needs to be added to @@ -62,6 +68,10 @@ 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; @@ -69,6 +79,13 @@ import com.stackify.apm.Trace; @Trace public class ClassToBeInstrumented { + + @Trace(start = true) + public void methodToStartNewTrace() + { + ... + } + @Trace public void methodToBeInstrumented() { @@ -102,7 +119,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. diff --git a/pom.xml b/pom.xml index 96a4dad..b34bdc9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ com.stackify stackify-java-apm-annot - 1.0.2-SNAPSHOT + 1.0.7-SNAPSHOT Stackify Java APM Annotations Stackify Java APM Annotations @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.1 + 1.6 sign-artifacts @@ -191,6 +191,9 @@ sign + + ${gpg.keyname} + diff --git a/src/main/java/com/stackify/apm/Trace.java b/src/main/java/com/stackify/apm/Trace.java index 01af5e5..05edabe 100644 --- a/src/main/java/com/stackify/apm/Trace.java +++ b/src/main/java/com/stackify/apm/Trace.java @@ -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. @@ -35,6 +35,13 @@ * {@literal @}Trace * public class ClassToBeInstrumented * { + * + * {@literal @}Trace(start = true) + * public void methodToStartNewTrace() + * { + * ... + * } + * * {@literal @}Trace * public void methodToBeInstrumented() * { @@ -90,9 +97,10 @@ String trackedFunctionName() default ""; String category() default "Java"; - + String subcategory() default "Other"; - + boolean action() default false; - + + boolean start() default false; }