Application observability with pod runtime injection
Inject OneAgent code modules into a container during its deployment.
This method of application instrumentation may not fully link Kubernetes workloads with monitored containers/processes. For comprehensive relationships and linking, consider using the automatic application-only injection.
Prerequisites
-
Review the list of supported applications and versions.
-
Create an access token with
PaaS Integration - InstallerDownload
scope. -
Storage requirements:
- ~325 MB for glibc
- ~290 MB for musl
- ~650 MB for glibc and musl combined
Deploy
To integrate OneAgent into your application at runtime, select one of the options below based on your platform.
Update
Each time you want to leverage a new OneAgent version, you only need to redeploy your pods. In runtime injections, OneAgent is downloaded and injected within an initContainer. By default, the latest version of OneAgent is downloaded, but you can control which OneAgent version is downloaded by specifying it in the download URL.
Uninstall
To uninstall OneAgent from application-only monitoring
-
Remove the install-oneagent YAML from your deployment template.
# your application containerscontainers:- name: customer-appimage: tomcatenv:- name: LD_PRELOADvalue: /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.sovolumeMounts:- mountPath: /opt/dynatrace/oneagentname: oneagent# initContainer to download OneAgentinitContainers:- name: install-oneagentimage: alpine:3.8command:- /bin/shargs:- -c- ARCHIVE=$(mktemp) && wget -O $ARCHIVE "$DT_API_URL/v1/deployment/installer/agent/unix/paas/latest?Api-Token=$DT_PAAS_TOKEN&$DT_ONEAGENT_OPTIONS" && unzip -o -d /opt/dynatrace/oneagent $ARCHIVE && rm -f $ARCHIVEenv:- name: DT_API_URLvalue: https://<Your-environment-ID>.live.dynatrace.com/api- name: DT_PAAS_TOKENvalue: <paastoken>- name: DT_ONEAGENT_OPTIONSvalue: flavor=<FLAVOR>&include=<TECHNOLOGY>volumeMounts:- mountPath: /opt/dynatrace/oneagentname: oneagent# Make OneAgent available as a volumevolumes:- name: oneagentemptyDir: {} -
Redeploy your application.