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 Kustomize for ease of use.
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 here). 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 Environment identifier to associate the observability data for this deployment with. To retrieve the environment identifier see the instructions on the environment page.
LABEL_TARGET_SELECTOR: These are selectors used to select which application to apply the instrumentation patch 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.