How to filter out traces using values from the trace payload

Versions Data Prepper Docker image version 2.13.0

Describe the issue: I am using the drop_events processor in a Data Prepper OTLP trace pipeline and trying to drop all spans where the HTTP path contains either “/actuator/” or “/webjars/” in the URL path and also traces from discovery service. I only managed to filter with traceGroup

otel-trace-pipeline:
  source:
    otel_trace_source:
      ssl: false

  processor:
    - drop_events:
        drop_when: 'contains(/traceGroup, "/actuator/") or contains(/traceGroup, "/webjars/")'

  sink:
    - opensearch:
        hosts: [ "http://opensearch:9200" ]
        username:
        password:
        index_type: trace-analytics-raw


However, using this

        drop_when: 'contains(/span.attributes.url@full, "/discovery/eureka")'

did not work. Or any other fields from the payload used to filter the traces

From the Data Prepper log (using sink: -stdout:)

"span.attributes.url@path":"/test-service/actuator/health"

OpenSearch payload:

[
  {
    "_index": "otel-v1-apm-span-000005",
    "_id": "a7f7485e796ac9f67a2da354455b10db/de23c16430389c3f",
    "_score": 1,
    "_source": {
      "traceId": "a7f7485e796ac9f67a2da354455b10db",
      "droppedLinksCount": 0,
      "kind": "SPAN_KIND_CLIENT",
      "droppedEventsCount": 0,
      "traceGroupFields": {
        "endTime": "2025-12-24T14:30:26.048928292Z",
        "durationInNanos": 72229044,
        "statusCode": 0
      },
      "traceGroup": "GET",
      "serviceName": "timesheet-monitor",
      "parentSpanId": "",
      "spanId": "de23c16430389c3f",
      "traceState": "",
      "name": "GET",
      "startTime": "2025-12-24T14:30:25.976699248Z",
      "links": [],
      "endTime": "2025-12-24T14:30:26.048928292Z",
      "droppedAttributesCount": 0,
      "durationInNanos": 72229044,
      "events": [],
      "resource.attributes.process@command_args": "[\"/layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java\",\"org.springframework.boot.loader.launch.JarLauncher\"]",
      "span.attributes.thread@id": 113,
      "resource.attributes.process@pid": 1,
      "resource.attributes.host@arch": "amd64",
      "resource.attributes.service@instance@id": "03846273-9643-4ec5-b557-6eef8ad9edc0",
      "resource.attributes.telemetry@sdk@version": "1.57.0",
      "resource.attributes.service@name": "timesheet-monitor",
      "status.code": 0,
      "resource.attributes.service@version": "2.1.902-SNAPSHOT",
      "resource.attributes.process@runtime@name": "OpenJDK Runtime Environment",
      "span.attributes.http@response@status_code": 200,
      "resource.attributes.os@type": "linux",
      "resource.attributes.telemetry@distro@version": "2.23.0",
      "span.attributes.url@full": "http://discovery-server:8080/discovery/eureka/apps/delta",
      "span.attributes.thread@name": "DiscoveryClient-CacheRefreshExecutor-%d",
      "resource.attributes.telemetry@sdk@language": "java",
      "span.attributes.http@request@method": "GET",
      "resource.attributes.host@name": "b2591bcd1b1a",
      "resource.attributes.process@runtime@description": "BellSoft OpenJDK 64-Bit Server VM 21.0.9+11-LTS",
      "resource.attributes.process@executable@path": "/layers/paketo-buildpacks_bellsoft-liberica/jre/bin/java",
      "instrumentationScope.version": "2.23.0-alpha",
      "instrumentationScope.name": "io.opentelemetry.apache-httpclient-5.0",
      "resource.attributes.process@runtime@version": "21.0.9+11-LTS",
      "resource.attributes.telemetry@sdk@name": "opentelemetry",
      "span.attributes.server@port": 8080,
      "resource.attributes.telemetry@distro@name": "opentelemetry-java-instrumentation",
      "span.attributes.network@protocol@version": "1.1",
      "resource.attributes.container@id": "b2591bcd1b1af72dbc33c25ac76d3453ccef66892aeb16696099e0c1a0dad282",
      "resource.attributes.os@description": "Linux 6.8.0-87-generic",
      "span.attributes.server@address": "discovery-server"
    },
    "sort": [
      1766586625976699100
    ]
  }
]

The issue/questions are straightforward, yet VERY frustrating. How do I use the url attribute that appears in the Data Prepper trace to filter it out in the drop events condition?

Configuration: Spring boot service (3.5) sends OTel traces to Data Prepper and from there to OpenSearch. I can see all the traces in OpenSearch

Relevant Logs or Screenshots: