I have a Java SpringBoot service that outputs logs through Log4j2 and is deployed in a cluster that includes DataDog Agent. The cluster is configured with DataDog Log Enabled=true. I cannot control the configuration of the cluster, so I want to configure the environment variables in the POD to Turn off DataDog to automatically collect my logs (DataDog is too expensive) I tried to inject in the Deployment environment variable of this Service in K8s:
- name: DD_LOGS_ENABLED
value: "false"
- name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
value: "false"
- name: DD_LOGS_INJECTION
value: "false"
- name: DD_APM_ENABLED
value: "false"
- name: DD_PROCESS_AGENT_ENABLED
value: "false"
- name: DD_COLLECT_KUBERNETES_EVENTS
value: "false"
Verified in the pod shell that the value has been injected, but DataDog is still collecting logs for the service. .
I want to know how to prevent DataDog from collecting logs of this service simply and effectively
Note: You cannot control the log handler as console or silent, because the logs still need to be collected by Loki, thank you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.