cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace OneAgent JSON Logs

kevin_mic
Newcomer

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"
}

 

4 REPLIES 4

Mizső
DynaMight Guru
DynaMight Guru

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

Grammar | Dynatrace Docs

I hope it helps.

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Mizső
DynaMight Guru
DynaMight Guru

Hi @kevin_mic ,

One more...

JSON Objects | Dynatrace Docs

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

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.

https://github.com/aws-samples/amazon-ecs-firelens-examples/tree/mainline/examples/fluent-bit/parse-...

Hi @kevin_mic ,

Thanks for sharing this information.

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Featured Posts