File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ NOTE: This installation method is in beta.
10
10
The attachment is supported on Windows,
11
11
Unix and Solaris operating systems on HotSpot-based JVMs (like OpenJDK and Oracle JDK) and OpenJ9.
12
12
13
- Some flags, like `--include` and `--exclude` require the `jps` command to be installed,
14
- which is part of the JDK distribution and does not typically come with the JRE distribution.
15
-
16
13
[float]
17
14
[[setup-attach-api-caveats]]
18
15
==== Caveats
@@ -27,6 +24,12 @@ That also means that if you are configuring the agent with `elasticapm.propertie
27
24
the application which attaches first gets to decide the configuration.
28
25
See the default value description of the <<config-service-name>> configuration option for ways to have different `service.name`s for each deployment.
29
26
27
+ The `apm-agent-attach` artifact has a transitive dependency on JNA which can be excluded most of the time when running
28
+ the application with a JDK. However, it will be required in the following cases:
29
+
30
+ * When attaching to a JRE and no other copy of JNA is present on the application classpath
31
+ * When attaching to a JDK fails and using JRE attach strategy as fallback.
32
+
30
33
[float]
31
34
[[setup-attach-api-usage]]
32
35
==== Usage
@@ -43,6 +46,12 @@ Declare a dependency to the link:https://search.maven.org/search?q=g:co.elastic.
43
46
</dependency>
44
47
----
45
48
49
+ [source,groovy]
50
+ .build.gradle
51
+ ----
52
+ compile "co.elastic.apm:apm-agent-attach:$elasticApmVersion"
53
+ ----
54
+
46
55
47
56
Call `ElasticApmAttacher.attach()` in the first line of your `public static void main(String[] args)` method.
48
57
You can’t perform that action at this time.
0 commit comments