inst-jobs-statsd 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inst_jobs_statsd/naming.rb +1 -13
- data/lib/inst_jobs_statsd/version.rb +1 -1
- data/spec/factories/jobs.rb +1 -1
- data/spec/inst_jobs_statsd/naming_spec.rb +3 -3
- metadata +23 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efc6027a4283d4fbe37e336710c974dfd2ddd1ab273613fbd9936fb0cfca37e5
|
4
|
+
data.tar.gz: eef10d80500c432b596436e28422c5b1243c1ec48de44fd73ec1a208ccc58734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4c9cad4da6c5d3897239e390445c852230655cb47fc5d5ca97c045d8d6923e1b33a8a6b7f8c8a66dda12e2636a204b4df6b8b1ca3f5912ece8a8ec991e7470f
|
7
|
+
data.tar.gz: f94e0bf3044911fbfc165f2320a2a08bbd744746e98771c3aded317e210ab2884294bf093b31ff386d2c7d0a22751d2dd48085b7e5785fe15a2191df2621cd65
|
@@ -8,10 +8,6 @@ module InstJobsStatsd
|
|
8
8
|
BASENAME
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.configure(strand_filter: nil)
|
12
|
-
@strand_filter = strand_filter
|
13
|
-
end
|
14
|
-
|
15
11
|
def self.qualified_names(stat_name, job)
|
16
12
|
names = ["#{basename}.#{stat_name}"]
|
17
13
|
tagged = tagged_stat(names[0], job)
|
@@ -36,9 +32,7 @@ module InstJobsStatsd
|
|
36
32
|
|
37
33
|
def self.dd_job_tags(job)
|
38
34
|
tags = dd_region_tags
|
39
|
-
return tags unless job
|
40
|
-
tags = custom_tags(job, tags)
|
41
|
-
return tags unless job.tag
|
35
|
+
return tags unless job&.tag
|
42
36
|
return tags if job.tag =~ /Class:0x/
|
43
37
|
|
44
38
|
method_tag, obj_tag = split_to_tag(job)
|
@@ -48,12 +42,6 @@ module InstJobsStatsd
|
|
48
42
|
tags
|
49
43
|
end
|
50
44
|
|
51
|
-
def self.custom_tags(job, tags)
|
52
|
-
tags[:jobshard] = job.shard.id if job.respond_to?(:shard)
|
53
|
-
tags[:strand] = job.strand if job&.strand && @strand_filter&.call(job)
|
54
|
-
tags
|
55
|
-
end
|
56
|
-
|
57
45
|
# this converts Foo#bar" or "Foo.bar" into "Foo and "bar",
|
58
46
|
# and makes sure the values are valid to be used for statsd names
|
59
47
|
def self.job_tags(job)
|
data/spec/factories/jobs.rb
CHANGED
@@ -43,12 +43,12 @@ RSpec.describe InstJobsStatsd::Naming do
|
|
43
43
|
|
44
44
|
describe '.dd_job_tags' do
|
45
45
|
it 'works' do
|
46
|
-
job = double(tag: 'Account.run_reports_later'
|
47
|
-
expect(InstJobsStatsd::Naming.dd_job_tags(job)).to eq(tag: 'Account.run_reports_later'
|
46
|
+
job = double(tag: 'Account.run_reports_later')
|
47
|
+
expect(InstJobsStatsd::Naming.dd_job_tags(job)).to eq(tag: 'Account.run_reports_later')
|
48
48
|
end
|
49
49
|
|
50
50
|
it 'properly munges job tags' do
|
51
|
-
job = double(tag: 'Quizzes::Quiz#do_something'
|
51
|
+
job = double(tag: 'Quizzes::Quiz#do_something')
|
52
52
|
expect(InstJobsStatsd::Naming.dd_job_tags(job)).to eq(tag: 'Quizzes-Quiz.do_something')
|
53
53
|
end
|
54
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inst-jobs-statsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Slade
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
@@ -34,20 +34,14 @@ dependencies:
|
|
34
34
|
name: inst_statsd
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.1.2
|
40
|
-
- - "<"
|
37
|
+
- - "~>"
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: '3.0'
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- - "
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: 2.1.2
|
50
|
-
- - "<"
|
44
|
+
- - "~>"
|
51
45
|
- !ruby/object:Gem::Version
|
52
46
|
version: '3.0'
|
53
47
|
- !ruby/object:Gem::Dependency
|
@@ -232,7 +226,7 @@ dependencies:
|
|
232
226
|
- - "~>"
|
233
227
|
- !ruby/object:Gem::Version
|
234
228
|
version: 1.4.0
|
235
|
-
description:
|
229
|
+
description:
|
236
230
|
email:
|
237
231
|
- jslade@instructure.com
|
238
232
|
executables: []
|
@@ -282,7 +276,7 @@ homepage: https://github.com/instructure/inst-jobs-statsd
|
|
282
276
|
licenses:
|
283
277
|
- MIT
|
284
278
|
metadata: {}
|
285
|
-
post_install_message:
|
279
|
+
post_install_message:
|
286
280
|
rdoc_options: []
|
287
281
|
require_paths:
|
288
282
|
- lib
|
@@ -290,36 +284,36 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
290
284
|
requirements:
|
291
285
|
- - ">="
|
292
286
|
- !ruby/object:Gem::Version
|
293
|
-
version: '2.
|
287
|
+
version: '2.7'
|
294
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
289
|
requirements:
|
296
290
|
- - ">="
|
297
291
|
- !ruby/object:Gem::Version
|
298
292
|
version: '0'
|
299
293
|
requirements: []
|
300
|
-
rubygems_version: 3.1.
|
301
|
-
signing_key:
|
294
|
+
rubygems_version: 3.1.6
|
295
|
+
signing_key:
|
302
296
|
specification_version: 4
|
303
297
|
summary: Stats reporting for inst-jobs
|
304
298
|
test_files:
|
305
|
-
- spec/factories/jobs.rb
|
306
|
-
- spec/factories/workers.rb
|
307
|
-
- spec/gemfiles/60.gemfile
|
308
299
|
- spec/inst_jobs_statsd/ext/job_spec.rb
|
309
|
-
- spec/inst_jobs_statsd/jobs_tracker_spec.rb
|
310
300
|
- spec/inst_jobs_statsd/naming_spec.rb
|
311
|
-
- spec/inst_jobs_statsd/stats/counters/complete_spec.rb
|
312
|
-
- spec/inst_jobs_statsd/stats/counters/create_spec.rb
|
313
|
-
- spec/inst_jobs_statsd/stats/counters/run_spec.rb
|
314
301
|
- spec/inst_jobs_statsd/stats/periodic/failed_spec.rb
|
315
|
-
- spec/inst_jobs_statsd/stats/periodic/queue_spec.rb
|
316
302
|
- spec/inst_jobs_statsd/stats/periodic/run_spec.rb
|
317
|
-
- spec/inst_jobs_statsd/stats/
|
303
|
+
- spec/inst_jobs_statsd/stats/periodic/queue_spec.rb
|
318
304
|
- spec/inst_jobs_statsd/stats/timing/failed_spec.rb
|
319
|
-
- spec/inst_jobs_statsd/stats/timing/perform_spec.rb
|
320
305
|
- spec/inst_jobs_statsd/stats/timing/pop_spec.rb
|
306
|
+
- spec/inst_jobs_statsd/stats/timing/perform_spec.rb
|
307
|
+
- spec/inst_jobs_statsd/stats/periodic_spec.rb
|
308
|
+
- spec/inst_jobs_statsd/stats/counters/run_spec.rb
|
309
|
+
- spec/inst_jobs_statsd/stats/counters/create_spec.rb
|
310
|
+
- spec/inst_jobs_statsd/stats/counters/complete_spec.rb
|
321
311
|
- spec/inst_jobs_statsd/stats/timing_spec.rb
|
322
|
-
- spec/
|
323
|
-
- spec/matchers.rb
|
324
|
-
- spec/setup_test_db.rb
|
312
|
+
- spec/inst_jobs_statsd/jobs_tracker_spec.rb
|
325
313
|
- spec/spec_helper.rb
|
314
|
+
- spec/setup_test_db.rb
|
315
|
+
- spec/matchers.rb
|
316
|
+
- spec/gemfiles/60.gemfile
|
317
|
+
- spec/factories/workers.rb
|
318
|
+
- spec/factories/jobs.rb
|
319
|
+
- spec/inst_statsd/default_tracking_spec.rb
|