The sql_query event resresents a SQL query being issued from within your application.

SELECT * FROM users (0.5ms)

Example JSON Structure

{
  "event": {
    "server_side_app": {
      "sql_query": {
        "sql": "SELECT * FROM users",
        "time_ms": 0.2
      }
    }
  }
}

Field descriptions

Name Type Description
sql string The raw SQL of the query. required max-length: 5000
time_ms number The time taken to execute the query in milliseconds. required

Using this data

Example queries:

  • Full path: event.server_side_app.sql_query.time_ms:>50
  • Short path: sql_query.time_ms:>50 - Short paths are aliases allowing for simpler access to these fields.
  • Only this event: is:sql_query

See our doc on using context & event data.

Questions? Need help?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us

Start a trial - 15 days free

Log better and solve problems faster, today. Less than 1 minutes to install.

Start a trial