-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary <!-- Ideally, there is an attached Linear ticket that will describe the "why". If relevant, use this section to call out any additional information you'd like to _highlight_ to the reviewer. --> This PR adds support to filter by the log level (internally called `SeverityText`). Will follow up for adding support for trace id and other non-custom attributes. This PR also replaces [squirrel](https://github.com/Masterminds/squirrel) with [go-sqlbuilder](https://github.com/huandu/go-sqlbuilder). There's a couple reasons for this: * squirrel is in [maintenance](https://github.com/Masterminds/squirrel#squirrel-is-complete) mode where as go-sqlbuilder has active development. * squirrel lacks `UNION` support. We'll need this for permalinking ([example](https://github.com/highlight/highlight/pull/4417/files#diff-e913069aa4c9c7492c6180d43d70b4d9200d25b074a1b346c87319b510b0327fR72-R95)). Per the previous point, it doesn't seem like squirrel will add union support even with a [PR ready](Masterminds/squirrel#320 (comment)). * seems like squirrel has some design pitfalls (see [FAQ](https://github.com/huandu/go-sqlbuilder#whats-the-difference-between-this-package-and-squirrel)). ## How did you test this change? <!-- Frontend - Leave a screencast or a screenshot to visually describe the changes. --> Unit tests added for testing level filtering. Our existing tests should cover the squirrel -> go-sqlbuilder transition Click test: ![Kapture 2023-03-01 at 16 25 41](https://user-images.githubusercontent.com/58678/222289818-aed17785-d41e-4603-92f0-9def5f7ba74f.gif) ## Are there any deployment considerations? <!-- Backend - Do we need to consider migrations or backfilling data? --> N/A
- Loading branch information
Showing
5 changed files
with
195 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.