13 Jan 2023 07:07 PM
My company is migrating to Dynatrace. We are installing the Dynatrace OneAgent on a AWS Fargate machine and it is transmitting our application logs to Dynatrace. The problem is that our application is emitting JSON logs and these JSON logs are then wrapped in another JSON log such that our original JSON log message is not parseable. Here is an example. Is the oneagent wrapping my application logs? Is there a way to configure it to work differently such that my JSON logs are parseable?
{
"timestamp": "2023-01-13T18:51:00.099628Z",
"source": "stdout",
"log": "{\"@timestamp\":\"2023-01-13T11:51:00.099-07:00\",\"@version\":\"1\",\"message\":\"Sending 1 events to queue\",\"logger_name\":\"com.test.SqsQueueEventManager\",\"thread_name\":\"MyThread\",\"level\":\"DEBUG\",\"level_value\":10000,\"EXECUTION_ID\":\"20244\",\"JOB_ID\":\"485\",\"appname\":\"ScoreProcessor\"}",
"container_id": "CONTAINER_ID",
"container_name": "CONTAINER_NAME",
"ecs_cluster": "ECS_CLUSTER",
"ecs_task_arn": "TASK_ARN",
"ecs_task_definition": "TASK_DEF"
}
Solved! Go to Solution.
13 Jan 2023 09:47 PM
Hi @kevin_mic ,
Have you already checked these documnetation about log processing?
Log processing | Dynatrace Docs
Log processing examples | Dynatrace Docs
Dynatrace Pattern Language | Dynatrace Docs
I hope it helps.
Best regards,
Mizső
13 Jan 2023 09:51 PM
Hi @kevin_mic ,
One more...
Best regards,
Mizső
17 Jan 2023 03:53 PM
Thank you for the response. It appears that my problem might actually be on the AWS side and not on Dynatrace's side. I found this documentation about AWS FireLense and JSON logs.
18 Jan 2023 08:50 AM
Hi @kevin_mic ,
Thanks for sharing this information.
Best regards,
Mizső