Skip to content

Commit

Permalink
Document caveats wrt statement type detection
Browse files Browse the repository at this point in the history
  • Loading branch information
pd committed Feb 10, 2016
1 parent 67e80af commit 2460027
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ Example metrics that might be emitted:
* `db.job.cache__prime.SELECT:10|g`: ten `SELECT` statements were issued when
processing the `Cache::Prime` job.

## Caveats

This library does not actually parse SQL queries; it uses a [very naive string munging
tactic](https://github.com/enova/active_record_stats/blob/master/spec/statement_type_spec.rb)
to identify the statement type involved. Because of this, some of the metrics are a
bit nonsensical, such as `WITH` statements being reported when a query begins with a CTE.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Expand Down

0 comments on commit 2460027

Please sign in to comment.