skip to Main Content

In my traces table, I’ve got messages like so:

Incoming transaction: 0504250624105104 validated
Incoming transaction: 0504250624105604 validated
Incoming transaction: 0504250624105604 validated
Incoming transaction: 0504250624105304 validated

How can I find all non distinct/duplicate messages i.e. so the above returns only the below value?

Incoming transaction: 0504250624105604 validated

2

Answers


  1. Just do this when message only contains of your sample data. Otherwise parse it in another variable and distinct that.

    traces
    | distinct message
    

    See the results here.

    If you ONLY want to have the duplicates, use this:

    traces
    | summarize Count=count() by message
    | where Count > 1
    

    See the results here

    Login or Signup to reply.
  2. Posting the answer as I mentioned in the comment with details.

    How to find non distinct/duplicate messages in Azure Application Insights?

    • Assuming the messages are stored in the traces table and the column for the message text is named message.

    Groups the results by the message column and counts the occurrences of each message. This filters the results to include only those messages where the count is greater than 1, indicating duplicates.

    Query:

    traces
    | summarize count() by message
    | where count_ > 1
    

    Sample data:

    enter image description here

    Result:

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search