Instrumenting your application on Kubernetes
Last updated
Last updated
If your application is running on Kubernetes you can easily instrument it using Digma without changing the original Helm chart/YAML files. We recommend using for ease of use.
Install .
Clone or download our repo
Make sure the scripts have execution permission
Run the create_customization.sh
script. You'll need to pass it some parameters based on the application and the Digma collector-api
IP/DNS address (read more ). Once you run this command, the helper scripts will generate a patch that can be applied with your Helm file to instrument the application.
PATH_TO_HELPER_REPO_ROOT
: The location where you cloned the helper repo to
DIGMA_COLLECTOR_URL
: The URL of the Digma collector endpoint and port. For example: http://internal.collector.dns:5050
ENVIRONMENT_ID
: The Digma identifier to associate the observability data for this deployment with. To retrieve the environment identifier see the instructions on the .
LABEL_TARGET_SELECTOR
: These are selectors used to select which application to apply the instrumentation on.
Following the last step, you should have two generated files in your local directory: patch.yaml
and kustomization.yaml
these will be used to patch in the instrumentation logic when you run the Helm file in the next step.
Finally, run your helm file with an additional --post-renderer
argument
The key steps to updating the application deployment are:
Mounting the OTEL agent and Digma agent extension to a volume accessible to the app container
Setting environment variables so that the Java process will use the OTEL agent and extension
See below an example of accomplishing these two steps using an init container and some environment variables. You can see the added code between the comment lines.