Skip to content

Commit

Permalink
v4.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
reidmorrison committed Jul 1, 2024
1 parent dc0dd5c commit 1c24b19
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,30 @@ make_col event:parse_json(log)

make_col
time:parse_isotime(event.timestamp),
application:string(event.application),
environment:string(event.environment),
duration:duration_ms(event.duration_ms),
level:string(event.level),
name:string(event.name),
message:string(event.message),
metric:string(event.metric),
named_tags:event.named_tags,
payload:event.payload,
metric:string(event.metric),
metric_amount:float64(event.metric_amount),
tags:array(event.tags),
exception:event.exception,
host:string(event.host),
application:string(event.application),
environment:string(event.environment),
level_index:int64(event.level_index),
pid:int64(event.pid),
thread:string(event.thread),
file:string(event.file),
line:int64(event.line),
backtrace:array(event.backtrace),
metric_amount:int64(event.metric_amount),
dimensions:event.dimensions,
exception:event.exception
backtrace:array(event.backtrace),
level_index:int64(event.level_index)

set_valid_from(time)
drop_col timestamp, log, event, stream
rename_col timestamp:time
~~~

Now queries can be built to drill down into each of these fields, including `payload` which is a nested object.
Expand All @@ -65,15 +69,24 @@ For example to find all failed Sidekiq job calls where the causing exception cla
~~~ruby
filter environment = "uat2"
filter level = "error"
filter metric ~ /Sidekiq/
filter metric = "sidekiq.job.perform"
filter (string(exception.cause.name) = "NoMethodError")
~~~

Or, to create a dashboard showing the duration of all successful Sidekiq jobs:
Example: create a dashboard showing the duration of all successful Sidekiq jobs:
~~~ruby
filter environment = "production"
filter level = "info"
filter metric ~ /Sidekiq.*/
filter metric = "sidekiq.job.perform"
timechart duration:avg(duration), group_by(name)
~~~

Example: create a dashboard showing the queue latency of all Sidekiq jobs.
The queue latency is the time between when the job was enqueued and when it was started:
~~~ruby
filter environment = "production"
filter level = "info"
filter metric = "sidekiq.queue.latency"
timechart duration:avg(duration), group_by(name)
~~~

Expand All @@ -83,7 +96,14 @@ timechart duration:avg(duration), group_by(name)

For complete documentation see: https://logger.rocketjob.io/rails

## Upgrading to Semantic Logger v4.15 - Sidekiq Support
## Upgrading to Semantic Logger V4.16 - Sidekiq Metrics Support

Rails Semantic Logger now supports Sidekiq metrics.
Below are the metrics that are now available when the JSON logging format is used:
- `sidekiq.job.perform` - The duration of each Sidekiq job.
- `sidekiq.queue.latency` - The time between when a Sidekiq job was enqueued and when it was started.

## Upgrading to Semantic Logger v4.15 & V4.16 - Sidekiq Support

Rails Semantic Logger introduces direct support for Sidekiq v4, v5, v6, and v7.
Please remove any previous custom patches or configurations to make Sidekiq work with Semantic Logger.
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_semantic_logger/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RailsSemanticLogger
VERSION = "4.15.0".freeze
VERSION = "4.16.0".freeze
end

0 comments on commit 1c24b19

Please sign in to comment.