Filter Criteria Syntax


The visual filter criteria editor is only capable of representing a subset of the criteria possible—more advanced filters can be created by defining the criteria directly with code. You can switch between the visual editor and the code editor using the toggle on the bottom right of the filter sheet.

Filters are implemented in Conductor using a Cocoa feature called predicates. For a complete description of their syntax, see Predicate Format String Syntax and BNF Definition of Cocoa Predicates in Apple’s Predicate Programming Guide. You can view the code for the default filters for a general idea of how they work.

Listed below are all the entities represented in a Conductor log file and their respective properties with a detailed description of each. You can use any and all of these properties to define filter criteria. The root object for request filters is a request and for activity filters is an activity.

If you need help creating a specific filter or have any questions, don’t hesitate to contact me and I’ll lend a hand!

Requests

NameTypeDescription
descriptionString

The controller and action the request was routed to, or the path of the URL if it wasn’t routed to a controller. The controller and action are displayed as they are when defining Rails routes—for example, the index action of UsersController would be users#index.

controllerString

The full name of the controller the request was routed to. For example, UsersController. This field is empty for requests not routed to a controller.

actionString

The name of the action the request was routed to. This field is empty for requests not routed to a controller.

urlString

The path and query components of the URL.

urlPathString

The path component of the URL.

urlParametersString

The query component of the URL.

methodString

The HTTP method of the request. For example, GET or POST.

ipString

The IP address the request originated from.

staticBoolean

Whether the request is for a static asset (such as a stylesheet, script, or image) or a dynamic request served by the Rails application.

formatString

The Rails response format. For example, HTML or JS. This field is empty for requests not routed to a controller.

responseString

The HTTP response code and a textual description of the code, concatenated with an em dash. For example, 200 — OK. This field may be empty for requests where logging is interrupted—for example, certain routing errors.

responseCodeInteger

The HTTP response code. This field may be empty for requests where logging is interrupted—for example, certain routing errors.

responseMessageString

A textual description of the HTTP response code. This field may be empty for requests where logging is interrupted—for example, certain routing errors.

durationDecimal

The total amount of time spent handling the request in seconds. This field may be empty for requests where logging is interrupted—for example, certain routing errors.

viewDurationDecimal

The time spent rendering views in seconds. This field may be empty for requests that don’t render views.

databaseDurationDecimal

The time spent performing database operations in seconds. This field may be empty for requests that don’t perform database operations.

dateDate

The date and time of the request.

parametersCollection

An un-nested array of the request’s query parameters. See Parameters.

activitiesCollection

The request’s activities. See Activities.

Parameters

NameTypeDescription
nameString

The parameter’s name. Since the parameters collection is un-nested, any hash or array parameters will use their complete names including brackets—for example, user[address][city] or ids[].

valueString

The parameter’s value.

Activities

NameTypeDescription
typeString

The type of activity. Possible values are:

  • Message
  • Query
  • Render
  • Error
  • Stack Trace
  • Mail
  • Redirect
  • Cache
  • File
  • Data
  • Filter Chain Halt
descriptionString

A summary of the activity. Each type of activity includes different information in the summary:

Message

The message.

Query

The SQL of the query (querySQL).

Render

The template name (renderTemplate) with a parenthesized render count (renderCount) if rendered as a collection more than once. For example, users/user (×3). The render count is formatted according to your localization settings.

Error

The exception (errorException) and message (errorMessage) concatenated with an em dash. For example, ActiveRecord::RecordNotFound — Couldn't find User with id=1.

Stack Trace

The source file (stackTraceFile), line number (stackTraceLine), and method (stackTraceMethod) concatenated with an em dash and colon. For example, lib/active_record/relation/finder_methods.rb — line 198: raise_record_not_found_exception!. The line number is formatted according to your localization settings.

Mail

The mailer (mailMailer), subject (mailSubject), and to addresses (mailToAddresses) of the email concatenated with a colon and an em dash. For example, UserNotifier: A new user has signed up — admin@example.com, sales@example.com.

Redirect

The redirect URL (redirectURL).

Cache

The cache operation (cacheOperation) and key (cacheKey). For example, Read users/1.

File

The path of the file (filePath).

Data

The filename sent to the browser (dataFilename).

Filter Chain Halt

The name of the halting filter (filterChainHaltFilter).

frameworkBoolean

Whether the activity originates in the Rails framework itself. This is relevant for filtering certain activities such as queries, renders, and stack traces where Rails itself may generating activities rather than your application directly.

logLevelInteger

A numeric representation of log level of the activity. This value is an integer so that inequalities can be used to filter activities—for example, you may want to see all activities with a log level greater than warnings. Possible values and the log levels they correspond to are:

  • 0: Debug
  • 1: Info
  • 2: Warn
  • 3: Error
  • 4: Fatal
  • 5: Unknown
durationDecimal

The duration of the activity in seconds. This field may be empty for activities that don’t have a duration.

queryModelString

The name of the ActiveRecord model associated with the query. This field is empty for queries not associated with a model.

queryOperationString

The query operation performed. Possible values are:

  • Load
  • Insert
  • Update
  • Delete
  • Existence
  • Count
  • Calculation
  • Transaction
  • Schema
  • Fixture
  • Other
querySQLString

The complete SQL statement of the query.

queryCachedBoolean

Whether the query was in the Rails query cache.

queryExplainsCollection

The query’s explains. See Explains.

renderTemplateString

The path and name of the template rendered, as passed to a call to render. For example, users/user.

renderTemplateFilenameString

The full path and filename within the views directory of the template rendered.

renderLayoutString

The path and name of the layout used to render the template. For example, layouts/application. This field may be empty if no layout was used.

renderLayoutFilenameString

The full path and filename within the views directory of the layout used to render the template. This field may be empty if no layout was used.

renderPartialBoolean

Whether the template rendered was a partial.

renderCountInteger

The number of times the template was rendered if rendered as a collection.

errorExceptionString

The type of exception.

errorMessageString

The message associated with the error.

stackTraceFileString

The path of the file containing the source code for the stack frame.

stackTraceLineInteger

The line number the stack frame is on.

stackTraceMethodString

The name of the method the stack frame is in.

stackTraceGemString

The name of the gem the stack frame is in. This field may be empty if the stack frame is not within a gem.

stackTraceGemVersionString

The version of the gem the stack frame is in. This field may be empty if the stack frame is not within a gem.

mailMailerString

The full name of the mailer that generated the email. For example, UserNotifier.

mailSubjectString

The subject of the email.

mailFromString

The full From header of the email. For example, John Doe <john@example.com>.

mailFromAddressString

The email address from the From header of the email. For example, john@example.com.

mailFromNameString

The display name from the From header of the email. For example, John Doe.

mailToString

The full To header of the email. For example, John Doe <john@example.com>, Jane Doe <jane@example.com>.

mailToAddressesString

A comma separated list of the email addresses from the To header of the email. For example, john@example.com, jane@example.com.

mailToNamesString

A comma separated list of the display names from the To header of the email. For example, John Doe, Jane Doe.

mailCCString

The full CC header of the email.

mailCCAddressesString

A comma separated list of the email addresses from the CC header of the email.

mailCCNamesString

A comma separated list of the display names from the CC header of the email.

mailBCCString

The full BCC header of the email.

mailBCCAddressesString

A comma separated list of the email addresses from the BCC header of the email.

mailBCCNamesString

A comma separated list of the display names from the BCC header of the email.

mailTextBodyString

The plain text body of the email or the text/plain part of a multipart email.

mailHTMLBodyString

The HTML body of the email or the text/html part of a multipart email.

mailRawBodyString

The raw body of the email, including the headers and all parts of multipart emails.

mailHeadersCollection

The email’s headers. See Mail Headers.

redirectURLString

The URL redirected to.

cacheOperationString

The type of cache operation performed. Possible values are:

  • Read
  • Write
  • Expire
  • Existence
cacheKeyString

The cache key operated on.

filePathString

The path of the file being sent.

fileFilenameString

The filename the file is being sent to the browser with.

fileTypeString

The HTTP content type of the file.

fileDispositionString

The way the file is being sent to the browser, either for display inline or as a download.

dataFilenameString

The filename the data is being sent to the browser with.

dataTypeString

The HTTP content type of the data.

dataDispositionString

The way the data is being sent to the browser, either for display inline or as a download.

filterChainHaltFilterString

The name of the filter that halted the filter chain.

Explains

NameTypeDescription
summaryString

The textual information associated with the explain. This field is only relevant to Postgres and SQLite.

tableString

The table column of MySQL explains.

keyString

The key column of MySQL explains.

rowsInteger

The rows column of MySQL explains.

rowsFilteredDecimal

The filtered column of MySQL explains represented as a percentage from 0 to 1. For example, 0.5 when 50% of rows are filtered.

informationString

The Extra column of MySQL explains.

comparisonString

The ref column of MySQL explains.

keyLengthInteger

The key_len column of MySQL explains.

possibleKeysString

The possible_keys column of MySQL explains.

joinTypeString

The type column of MySQL explains.

selectTypeString

The select_type column of MySQL explains.

queryIDInteger

The selectid column of SQLite explains.

fromPositionInteger

The from column of SQLite explains.

childrenCollection

Child explains nested below this one. This field is only relevant to database adaptors that output nested explains (currently Postgres and SQLite).

Mail Headers

NameTypeDescription
nameString

The header’s name.

valueString

The header’s value.