barclay
barclay

Reputation: 4562

How do I query DataDog for a phrase in the stack trace?

DataDog is so useless in its querying and its intuitiveness ... I'm looking for a custom exception in the stack trace. I found individual log entries in the last 18 hours that contain my exception class name, but attempting to write a log query that will find me all the occurrences is returning nothing. E.g.:

environment:prod @thrown.extendedStackTrace:UserDoesNotExistException

I'd like to include more words in the query, but even reducing down a single word fails to find anything. I've looked at their documentation, which is zero help.

Upvotes: 11

Views: 10957

Answers (2)

James Bassett
James Bassett

Reputation: 9928

The following worked for me (where my stacktrace is in a stack_trace attribute) after reading the doco and trial and error:

@stack_trace:*the?quick?brown?fox*

i.e. to search on a phrase (multiple words), don't use quotes (so leading/trailing wildcards work) and replace spaces with ?

Upvotes: 13

Chango
Chango

Reputation: 41

Try adding wildcards on either side of your search query.

For example:

environment:prod @thrown.extendedStackTrace:*UserDoesNotExistException*

Make sure the query value itself (i.e. the value after the colon) isn't wrapped in quotes, as wildcards do not work within quotes since it would be read as a string literal.

Upvotes: 4

Related Questions