opensearch-project / data-prepper

OpenSearch Data Prepper is a component of the OpenSearch project that accepts, filters, transforms, enriches, and routes data at scale.
https://opensearch.org/docs/latest/clients/data-prepper/index/
Apache License 2.0
263 stars 197 forks source link

[BUG] Data Prepper Expression string starting in / is considered escaped Json Pointer #1188

Open sbayer55 opened 2 years ago

sbayer55 commented 2 years ago

Describe the bug Data Prepper Expression string where the first character is / are evaluated as escaped Json Pointer.

To Reproduce Steps to reproduce the behavior:

Using the following configuration:

simple-pipeline:
  workers: 1
  source:
      http:
        thread_count: 1
  prepper:
    - drop_events:
        drop_when: '/message == "/Hello"'
  sink:
    - file:
        path: /tmp/sink.log
  1. Start Data Prepper
  2. curl -k -H "Content-Type: application/json" -d '{"message": "/Hello"}' 'http://localhost:2021/log/ingest
  3. Verify in /tmp/sink.log event was not dropped.

Expected behavior Support for Strings starting in a forward slash '/'

Screenshots

image

Environment (please complete the following information):

Additional context n/a

joelmarty commented 3 days ago

I am having the same issue, @sbayer55 do you have workaround ?