Skip to content

Commit cb34d60

Browse files
authored
fix doc for runtime attach (elastic#2386)
1 parent 1c5934d commit cb34d60

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/setup-attach-api.asciidoc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ NOTE: This installation method is in beta.
1010
The attachment is supported on Windows,
1111
Unix and Solaris operating systems on HotSpot-based JVMs (like OpenJDK and Oracle JDK) and OpenJ9.
1212

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-
1613
[float]
1714
[[setup-attach-api-caveats]]
1815
==== Caveats
@@ -27,6 +24,12 @@ That also means that if you are configuring the agent with `elasticapm.propertie
2724
the application which attaches first gets to decide the configuration.
2825
See the default value description of the <<config-service-name>> configuration option for ways to have different `service.name`s for each deployment.
2926

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+
3033
[float]
3134
[[setup-attach-api-usage]]
3235
==== Usage
@@ -43,6 +46,12 @@ Declare a dependency to the link:https://search.maven.org/search?q=g:co.elastic.
4346
</dependency>
4447
----
4548

49+
[source,groovy]
50+
.build.gradle
51+
----
52+
compile "co.elastic.apm:apm-agent-attach:$elasticApmVersion"
53+
----
54+
4655

4756
Call `ElasticApmAttacher.attach()` in the first line of your `public static void main(String[] args)` method.
4857

0 commit comments

Comments
 (0)