Drop Processor on APM-Elastic

Viewed 39

I am using Elastic APM, but want to drop some data based on service.environment, but seems it not to be working. below is the code under ingest pipeline

[
  {
    "drop": {
      "if": "'service.environment' == 'ct1'",
      "description": "Drop documents that contain 'service.environment' == ct1"
    }
  }
]
1 Answers

The condition needs to be

[
  {
    "drop": {
      "if": "ctx.service.environment == 'ct1'",
      "description": "Drop documents that contain 'service.environment' == ct1"
    }
  }
]
 
Related