newrelic-sidekiq-metrics 1.0.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundler-version +1 -0
- data/.dependabot/config.yml +5 -7
- data/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- data/.github/ISSUE_TEMPLATE/config.yml +1 -0
- data/.github/ISSUE_TEMPLATE/story.md +22 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- data/.github/workflows/auto-approve.yml +16 -0
- data/.github/workflows/auto-merge.yml +19 -0
- data/.travis.yml +4 -2
- data/Gemfile.lock +53 -46
- data/lib/newrelic_sidekiq_metrics.rb +4 -0
- data/lib/newrelic_sidekiq_metrics/recorder.rb +7 -2
- data/lib/newrelic_sidekiq_metrics/version.rb +1 -1
- data/newrelic-sidekiq-metrics.gemspec +13 -12
- metadata +34 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff0aad65cd83cb47a11b9cdb7cdfbb23044fdf7c565d8dd85b0b90d30a273453
|
4
|
+
data.tar.gz: 78054abb2a57917468f409c3a19564ffe37a9a15cbff1a50a01f5ed9d95df6fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05ea0a727319ff8e3b98bb26999f5e1c103c81bbf4870bd1360f4ba68436eec4d50adfc7168ff1555ffbfa220ed6f11a58e54d815ae4ea1181b24b0b9feefc3f
|
7
|
+
data.tar.gz: 0c6486e4da0b24fffc90fc37d01dc7597837c9d9f2c50422bc6ec8f411ba5dc5fcf43187aa865412e9b1e24e57dc6efd51a88d523f5d90b16eeb0362b5d34128
|
data/.bundler-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.14
|
data/.dependabot/config.yml
CHANGED
@@ -3,16 +3,14 @@ version: 1
|
|
3
3
|
update_configs:
|
4
4
|
- package_manager: "ruby:bundler"
|
5
5
|
directory: "/"
|
6
|
-
update_schedule: "
|
6
|
+
update_schedule: "daily"
|
7
7
|
commit_message:
|
8
8
|
prefix: "[dependabot]"
|
9
9
|
allowed_updates:
|
10
10
|
- match:
|
11
|
-
|
11
|
+
dependency_type: "all"
|
12
|
+
update_type: "security"
|
12
13
|
automerged_updates:
|
13
14
|
- match:
|
14
|
-
dependency_type: "
|
15
|
-
update_type: "
|
16
|
-
- match:
|
17
|
-
dependency_type: "production"
|
18
|
-
update_type: "all"
|
15
|
+
dependency_type: "all"
|
16
|
+
update_type: "security:patch"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to track an issue that has been identified
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See error
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Mutation/Query**
|
24
|
+
|
25
|
+
**URL and HTTP method (for non-GQL):**
|
26
|
+
|
27
|
+
**Sentry or Logs URL:**
|
28
|
+
|
29
|
+
**User/authentication details**
|
30
|
+
Impacted user name or service account
|
31
|
+
|
32
|
+
**Additional context**
|
33
|
+
Add any other context about the problem here.
|
@@ -0,0 +1 @@
|
|
1
|
+
blank_issues_enabled: false
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
name: New story
|
3
|
+
about: Add a new story for implementation
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the solution**
|
11
|
+
A clear and concise description of what you want to happen.
|
12
|
+
When will this feature be done?
|
13
|
+
|
14
|
+
**Describe the users**
|
15
|
+
Who are we building this feature for?
|
16
|
+
|
17
|
+
**Additional context**
|
18
|
+
Add any other context or screenshots about the feature request here.
|
19
|
+
Link to any applicable documents describing the feature.
|
20
|
+
|
21
|
+
**Designs**
|
22
|
+
Link to any applicable designs on Invision.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
## Description
|
2
|
+
<!--- Describe your changes in detail -->
|
3
|
+
|
4
|
+
## Related issue(s)
|
5
|
+
<!--- GH issue number -->
|
6
|
+
|
7
|
+
## Motivation and Context
|
8
|
+
<!--- Why is this change required? What problem does it solve? -->
|
9
|
+
<!--- If it fixes an open issue, please link to the issue here. -->
|
10
|
+
|
11
|
+
## How Has This Been Tested?
|
12
|
+
<!--- Please describe in detail how you tested your changes. -->
|
13
|
+
|
14
|
+
## Screenshots (if appropriate):
|
15
|
+
<!--- Please add any screenshots of the feature. -->
|
16
|
+
|
17
|
+
## Related PRs
|
18
|
+
<!--- Please add links to any related PRs (backend, component packages, etc). -->
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# automatically approve PRs submitted by Dependabot or Renofidev
|
2
|
+
# this will allow Dependabot to automatically merge dependency update PRs where CI passes
|
3
|
+
# from: https://github.com/hmarr/auto-approve-action
|
4
|
+
name: Auto approve dependency upgrades PRs
|
5
|
+
|
6
|
+
on:
|
7
|
+
pull_request
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
auto-approve:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: hmarr/auto-approve-action@v2.0.0
|
14
|
+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev'
|
15
|
+
with:
|
16
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: automerge
|
2
|
+
on:
|
3
|
+
pull_request_review:
|
4
|
+
types:
|
5
|
+
- submitted
|
6
|
+
check_suite:
|
7
|
+
types:
|
8
|
+
- completed
|
9
|
+
status: {}
|
10
|
+
jobs:
|
11
|
+
automerge:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- name: automerge
|
15
|
+
uses: "pascalgn/automerge-action@v0.12.0"
|
16
|
+
env:
|
17
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
18
|
+
MERGE_METHOD: squash
|
19
|
+
MERGE_DELETE_BRANCH: true
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,64 +1,70 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
newrelic-sidekiq-metrics (1.0
|
5
|
-
newrelic_rpm (~> 6.
|
6
|
-
sidekiq (~> 6.
|
4
|
+
newrelic-sidekiq-metrics (1.2.0)
|
5
|
+
newrelic_rpm (~> 6.14)
|
6
|
+
sidekiq (~> 6.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
ast (2.4.
|
12
|
-
coderay (1.1.
|
13
|
-
connection_pool (2.2.
|
14
|
-
diff-lcs (1.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
rack (2.1.1)
|
25
|
-
rack-protection (2.0.8.1)
|
26
|
-
rack
|
11
|
+
ast (2.4.2)
|
12
|
+
coderay (1.1.3)
|
13
|
+
connection_pool (2.2.3)
|
14
|
+
diff-lcs (1.4.4)
|
15
|
+
method_source (1.0.0)
|
16
|
+
newrelic_rpm (6.15.0)
|
17
|
+
parallel (1.20.1)
|
18
|
+
parser (3.0.0.0)
|
19
|
+
ast (~> 2.4.1)
|
20
|
+
pry (0.14.0)
|
21
|
+
coderay (~> 1.1)
|
22
|
+
method_source (~> 1.0)
|
23
|
+
rack (2.2.3)
|
27
24
|
rainbow (3.0.0)
|
28
|
-
rake (13.0.
|
29
|
-
redis (4.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
rspec-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
rspec-
|
25
|
+
rake (13.0.3)
|
26
|
+
redis (4.2.5)
|
27
|
+
regexp_parser (2.1.1)
|
28
|
+
rexml (3.2.4)
|
29
|
+
rspec (3.10.0)
|
30
|
+
rspec-core (~> 3.10.0)
|
31
|
+
rspec-expectations (~> 3.10.0)
|
32
|
+
rspec-mocks (~> 3.10.0)
|
33
|
+
rspec-core (3.10.1)
|
34
|
+
rspec-support (~> 3.10.0)
|
35
|
+
rspec-expectations (3.10.1)
|
37
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-mocks (3.
|
37
|
+
rspec-support (~> 3.10.0)
|
38
|
+
rspec-mocks (3.10.2)
|
40
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-support (3.
|
43
|
-
rubocop (
|
44
|
-
jaro_winkler (~> 1.5.1)
|
40
|
+
rspec-support (~> 3.10.0)
|
41
|
+
rspec-support (3.10.2)
|
42
|
+
rubocop (1.11.0)
|
45
43
|
parallel (~> 1.10)
|
46
|
-
parser (>=
|
44
|
+
parser (>= 3.0.0.0)
|
47
45
|
rainbow (>= 2.2.2, < 4.0)
|
46
|
+
regexp_parser (>= 1.8, < 3.0)
|
47
|
+
rexml
|
48
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
48
49
|
ruby-progressbar (~> 1.7)
|
49
|
-
unicode-display_width (>= 1.4.0, <
|
50
|
-
rubocop-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
51
|
+
rubocop-ast (1.4.1)
|
52
|
+
parser (>= 2.7.1.5)
|
53
|
+
rubocop-rake (0.5.1)
|
54
|
+
rubocop
|
55
|
+
rubocop-rspec (2.2.0)
|
56
|
+
rubocop (~> 1.0)
|
57
|
+
rubocop-ast (>= 1.1.0)
|
58
|
+
ruby-progressbar (1.11.0)
|
59
|
+
sidekiq (6.2.0)
|
54
60
|
connection_pool (>= 2.2.2)
|
55
|
-
rack (
|
56
|
-
|
57
|
-
|
58
|
-
unicode-display_width (1.6.1)
|
61
|
+
rack (~> 2.0)
|
62
|
+
redis (>= 4.2.0)
|
63
|
+
unicode-display_width (2.0.0)
|
59
64
|
|
60
65
|
PLATFORMS
|
61
66
|
ruby
|
67
|
+
x86_64-linux
|
62
68
|
|
63
69
|
DEPENDENCIES
|
64
70
|
bundler
|
@@ -67,7 +73,8 @@ DEPENDENCIES
|
|
67
73
|
rake
|
68
74
|
rspec
|
69
75
|
rubocop
|
70
|
-
rubocop-
|
76
|
+
rubocop-rake
|
77
|
+
rubocop-rspec
|
71
78
|
|
72
79
|
BUNDLED WITH
|
73
|
-
2.
|
80
|
+
2.2.15
|
@@ -10,14 +10,19 @@ module NewrelicSidekiqMetrics
|
|
10
10
|
metrics.each { |m| record_metric(m) }
|
11
11
|
end
|
12
12
|
|
13
|
+
private
|
14
|
+
|
13
15
|
def stats
|
14
16
|
@stats ||= Sidekiq::Stats.new
|
15
17
|
end
|
16
18
|
|
17
|
-
|
19
|
+
def get_stat(name)
|
20
|
+
return 0 if NewrelicSidekiqMetrics.inline_sidekiq?
|
21
|
+
stats.public_send(name)
|
22
|
+
end
|
18
23
|
|
19
24
|
def record_metric(name)
|
20
|
-
NewRelic::Agent.record_metric(metric_full_name(name),
|
25
|
+
NewRelic::Agent.record_metric(metric_full_name(name), get_stat(name))
|
21
26
|
end
|
22
27
|
|
23
28
|
def metric_full_name(name)
|
@@ -3,14 +3,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
require 'newrelic_sidekiq_metrics/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
6
|
+
spec.name = 'newrelic-sidekiq-metrics'
|
7
|
+
spec.version = NewrelicSidekiqMetrics::VERSION
|
8
|
+
spec.authors = ['Krzysztof Knapik', 'RenoFi Engineering Team']
|
9
|
+
spec.email = ['knapo@knapo.net', 'engineering@renofi.com']
|
10
10
|
|
11
|
-
spec.summary
|
11
|
+
spec.summary = 'Implements recording Sidekiq stats to New Relic metrics.'
|
12
12
|
spec.homepage = 'https://github.com/RenoFi/newrelic-sidekiq-metrics'
|
13
|
-
spec.license
|
13
|
+
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/newrelic-sidekiq-metrics'
|
16
16
|
spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/newrelic-sidekiq-metrics'
|
@@ -18,19 +18,20 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.files = Dir.chdir(__dir__) do
|
19
19
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
|
20
20
|
end
|
21
|
-
spec.bindir
|
22
|
-
spec.executables
|
21
|
+
spec.bindir = 'exe'
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.required_ruby_version = '>= 2.
|
25
|
+
spec.required_ruby_version = '>= 2.6'
|
26
26
|
|
27
|
-
spec.add_dependency 'newrelic_rpm', '~> 6.
|
28
|
-
spec.add_dependency 'sidekiq', '~> 6.
|
27
|
+
spec.add_dependency 'newrelic_rpm', '~> 6.14'
|
28
|
+
spec.add_dependency 'sidekiq', '~> 6.1'
|
29
29
|
|
30
30
|
spec.add_development_dependency 'bundler'
|
31
31
|
spec.add_development_dependency 'pry'
|
32
32
|
spec.add_development_dependency 'rake'
|
33
33
|
spec.add_development_dependency 'rspec'
|
34
34
|
spec.add_development_dependency 'rubocop'
|
35
|
-
spec.add_development_dependency 'rubocop-
|
35
|
+
spec.add_development_dependency 'rubocop-rake'
|
36
|
+
spec.add_development_dependency 'rubocop-rspec'
|
36
37
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic-sidekiq-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
- RenoFi Engineering Team
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: newrelic_rpm
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '6.
|
20
|
+
version: '6.14'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '6.
|
27
|
+
version: '6.14'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: sidekiq
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 6.
|
34
|
+
version: '6.1'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 6.
|
41
|
+
version: '6.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,7 +110,7 @@ dependencies:
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name: rubocop-
|
113
|
+
name: rubocop-rake
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
@@ -123,7 +123,21 @@ dependencies:
|
|
123
123
|
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
|
-
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rubocop-rspec
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
description:
|
127
141
|
email:
|
128
142
|
- knapo@knapo.net
|
129
143
|
- engineering@renofi.com
|
@@ -131,7 +145,14 @@ executables: []
|
|
131
145
|
extensions: []
|
132
146
|
extra_rdoc_files: []
|
133
147
|
files:
|
148
|
+
- ".bundler-version"
|
134
149
|
- ".dependabot/config.yml"
|
150
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
151
|
+
- ".github/ISSUE_TEMPLATE/config.yml"
|
152
|
+
- ".github/ISSUE_TEMPLATE/story.md"
|
153
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
154
|
+
- ".github/workflows/auto-approve.yml"
|
155
|
+
- ".github/workflows/auto-merge.yml"
|
135
156
|
- ".gitignore"
|
136
157
|
- ".rspec"
|
137
158
|
- ".travis.yml"
|
@@ -152,7 +173,7 @@ licenses:
|
|
152
173
|
metadata:
|
153
174
|
homepage_uri: https://github.com/RenoFi/newrelic-sidekiq-metrics
|
154
175
|
source_code_uri: https://github.com/RenoFi/newrelic-sidekiq-metrics
|
155
|
-
post_install_message:
|
176
|
+
post_install_message:
|
156
177
|
rdoc_options: []
|
157
178
|
require_paths:
|
158
179
|
- lib
|
@@ -160,15 +181,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
181
|
requirements:
|
161
182
|
- - ">="
|
162
183
|
- !ruby/object:Gem::Version
|
163
|
-
version: '2.
|
184
|
+
version: '2.6'
|
164
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
186
|
requirements:
|
166
187
|
- - ">="
|
167
188
|
- !ruby/object:Gem::Version
|
168
189
|
version: '0'
|
169
190
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
-
signing_key:
|
191
|
+
rubygems_version: 3.2.15
|
192
|
+
signing_key:
|
172
193
|
specification_version: 4
|
173
194
|
summary: Implements recording Sidekiq stats to New Relic metrics.
|
174
195
|
test_files: []
|