Step 1: Create an autoinstrument.yaml file with the following content.
spec:
template:
spec:
shareProcessNamespace: true
containers:
- name: autoinstrumentation-go
image: otel/autoinstrumentation-go
imagePullPolicy: IfNotPresent
env:
- name: OTEL_GO_AUTO_TARGET_EXE
value: /<File_executable_path>
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://<Applicare_ip>:<Applicare_collector_port>"
- name: OTEL_SERVICE_NAME
value: "<service_name>"
securityContext:
runAsUser: 0
privileged: true
Important: Change the below values in the above file.
<File_executable_path>= Directory for starting the Go application
<Applicare_ip>= IP address of the machine running Applicare
<Applicare_collector_port>= Port of the machine running Applicare
<Service_Name>= The name of the agent as shown in the Applicare console.
Step 2: Go to the directory with the YAML file and run the command below
kubectl patch deployment <deployment_name> --patch "$(cat autoinstrument.yaml )"
Important: Change the below values in the above command.
<deployment_name>= Go Application Deployment Name
Step 3: This will restart your pods in the Kubernetes deployment.
Important: The following document outlines how to access Go application data in Applicare after configuration.
Go Application data in Kubernetes
Comments
0 comments
Article is closed for comments.