Skip to content

Commit 1c24b19

Browse files
committed
v4.16.0
1 parent dc0dd5c commit 1c24b19

File tree

2 files changed

+32
-12
lines changed

2 files changed

+32
-12
lines changed

README.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,30 @@ make_col event:parse_json(log)
3737

3838
make_col
3939
time:parse_isotime(event.timestamp),
40+
application:string(event.application),
41+
environment:string(event.environment),
4042
duration:duration_ms(event.duration_ms),
4143
level:string(event.level),
4244
name:string(event.name),
4345
message:string(event.message),
44-
metric:string(event.metric),
4546
named_tags:event.named_tags,
4647
payload:event.payload,
48+
metric:string(event.metric),
49+
metric_amount:float64(event.metric_amount),
4750
tags:array(event.tags),
51+
exception:event.exception,
4852
host:string(event.host),
49-
application:string(event.application),
50-
environment:string(event.environment),
51-
level_index:int64(event.level_index),
5253
pid:int64(event.pid),
5354
thread:string(event.thread),
5455
file:string(event.file),
5556
line:int64(event.line),
56-
backtrace:array(event.backtrace),
57-
metric_amount:int64(event.metric_amount),
5857
dimensions:event.dimensions,
59-
exception:event.exception
58+
backtrace:array(event.backtrace),
59+
level_index:int64(event.level_index)
60+
61+
set_valid_from(time)
62+
drop_col timestamp, log, event, stream
63+
rename_col timestamp:time
6064
~~~
6165

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

72-
Or, to create a dashboard showing the duration of all successful Sidekiq jobs:
76+
Example: create a dashboard showing the duration of all successful Sidekiq jobs:
7377
~~~ruby
7478
filter environment = "production"
7579
filter level = "info"
76-
filter metric ~ /Sidekiq.*/
80+
filter metric = "sidekiq.job.perform"
81+
timechart duration:avg(duration), group_by(name)
82+
~~~
83+
84+
Example: create a dashboard showing the queue latency of all Sidekiq jobs.
85+
The queue latency is the time between when the job was enqueued and when it was started:
86+
~~~ruby
87+
filter environment = "production"
88+
filter level = "info"
89+
filter metric = "sidekiq.queue.latency"
7790
timechart duration:avg(duration), group_by(name)
7891
~~~
7992

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

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

86-
## Upgrading to Semantic Logger v4.15 - Sidekiq Support
99+
## Upgrading to Semantic Logger V4.16 - Sidekiq Metrics Support
100+
101+
Rails Semantic Logger now supports Sidekiq metrics.
102+
Below are the metrics that are now available when the JSON logging format is used:
103+
- `sidekiq.job.perform` - The duration of each Sidekiq job.
104+
- `sidekiq.queue.latency` - The time between when a Sidekiq job was enqueued and when it was started.
105+
106+
## Upgrading to Semantic Logger v4.15 & V4.16 - Sidekiq Support
87107

88108
Rails Semantic Logger introduces direct support for Sidekiq v4, v5, v6, and v7.
89109
Please remove any previous custom patches or configurations to make Sidekiq work with Semantic Logger.

lib/rails_semantic_logger/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module RailsSemanticLogger
2-
VERSION = "4.15.0".freeze
2+
VERSION = "4.16.0".freeze
33
end

0 commit comments

Comments
 (0)