Using datadog official docs, I am able to print the K8s stdout/stderr logs in DataDog UI, my motive is to print the app logs which are generated by spring boot application at a certain location in my pod.
Configurations done in cluster :
- Created ServiceAccount in my cluster along with cluster role and cluster role binding
- Created K8s secret to hold DataDog API key
- Deployed the DataDog Agent as daemonset in all nodes
Configurations done in App :
- Download datadog.jar and instrument it along with my app execution
- Exposed ports 8125 and 8126
- Added environment tags
DD_TRACE_SPAN_TAGS,DD_TRACE_GLOBAL_TAGSin deployment file - Changed pattern in
logback.xml - Added logs config in deployment file
- Added env tags in deployment file
After doing above configurations I am able to log stdout/stderr logs where as I wanted to log application logs in datadog UI
If someone has done this please let me know what am I missing here. If required, I can share the configurations as well. Thanks in advance