17

On DataDog log search, I want to search for logs with empty string for a specific facet, e.g. logs with userId is empty. @userId:'' , @userId:"", -@userId:* non worked.

hevi
  • 2,432
  • 1
  • 32
  • 51

2 Answers2

20

this seem to be working: -@userId:*?* do not forget the minus at the start.

hevi
  • 2,432
  • 1
  • 32
  • 51
  • 2
    For future searchers: I was hoping to use this to find instances of my array facet where the array is null/empty, but no luck. thanks for sharing anyway, what a strange wrinkle! – cincodenada Nov 23 '21 at 20:07
9

This may have been patched. -@userId:* is working for me, now.

steel
  • 11,883
  • 7
  • 72
  • 109