Map Datadog event attribute to status


If your Datadog logs show the incorrect Status, then you should set up a log status remapper.

Go to Logs > Pipelines > Add a new pipeline.

Set up an optional Filter for your service like:

service:api.example.com

If your Datadog log’s Event Attributes looks like:

{
  "log_level_name": "ERROR"
}

Then all you need to do is click Add Processor, select Status Remapper, and update Set status attribute(s) to:

log_level_name

If your Datadog log’s Event Attributes looks like:

{
  "log_level_value": 400
}

Then click Add Processor, select Category Processor, and update Set target category attribute:

log_level_mapping

Add the entries to map your category attributes:

NAME MATCHING QUERY
Error @log_level_value:400
Warning @log_level_value:300
Info @log_level_value:200

Then click Add Processor, select Status Remapper, and update Set status attribute(s) to:

log_level_mapping

Now your Datadog log statuses should be mapped correctly!

For more information, see “Remap Custom Severity Values to the Official Log Status”.



Please support this site and join our Discord!