Skip to content

Commit

Permalink
docs: Addition to native image section of edge docs (#1134)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren authored Mar 13, 2024
1 parent 433d491 commit 59c6c52
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions akka-edge-docs/src/main/paradox/lightweight-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,22 @@ Native Image builds can be integrated into your application using build tool plu
* [sbt plugin for GraalVM Native Image](https://github.com/scalameta/sbt-native-image)

Native Image builds need to be configured in various ways. See the build tool plugins and the [Native Image build
configuration][native-image-configuration] reference documentation for more information on how to do this. An important
part of the configuration is the _reachability metadata_, which covers dynamic features used at runtime and which can't
be discovered statically at build time.
configuration][native-image-configuration] reference documentation for more information on how to do this.

An important part of the configuration is the _reachability metadata_, which covers dynamic features used at runtime and which can't
be discovered statically at build time. Akka provides Native Image metadata for many of the modules, and can detect and register
user messages when using Akka Serialization Jackson, so a client application may not need to define any additional reachability metadata.

For more details on what support Akka provides see the @extref[Akka documentation on Native Image](akka:additional/native-image.html).

### GraalVM tracing agent

GraalVM provides a [tracing agent][native-image-tracing] to automatically gather metadata and create configuration
files. The tracing agent tracks usage of dynamic features during regular running of the application in a JVM, and
outputs Native Image configuration based on the code paths that were exercised. The build tool plugins for Native Image
provide ways to run locally with the tracing agent enabled. It can also be useful to deploy your application to a
testing environment with the GraalVM tracing agent enabled, to capture usage in an actual deployment environment and
exercising all the Akka Edge features that are being used.
If an application uses special features or libraries not supported out of the box with Akka it is possible to automatically
gather metadata and create configuration files using the GraalVM [tracing agent][native-image-tracing]. The tracing agent
tracks usage of dynamic features during regular running of the application in a JVM, and outputs Native Image configuration
based on the code paths that were exercised. The build tool plugins for Native Image provide ways to run locally with the
tracing agent enabled. It can also be useful to deploy your application to a testing environment with the GraalVM tracing
agent enabled, to capture usage in an actual deployment environment and exercising all the Akka Edge features that are being used.

@@@ note
The GraalVM Native Image tracing agent can only generate configuration for code paths that were observed during the
Expand Down

0 comments on commit 59c6c52

Please sign in to comment.