skylight-core 4.0.0.alpha3 → 4.0.0.alpha4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b333f6d3704521099216e030773e068bbae7fb08cdea202b8ffc81e76a0beed
|
4
|
+
data.tar.gz: 00042ab9ca7c24ccba1ea0ebebcbfb664aa78755cfc9d6ae6595f2f7e5754bd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a125f7978eb1c05a848a06edaf10ffea2b16227ea474ea0e9a069633ed40029baf8667e569a9664621a486e0bea053011609c9703d634f20ca04489d9aae46
|
7
|
+
data.tar.gz: c53a44d21608de2a245a8b36ef8d7d4b02870723c88dde340d036473803002f2bef202354cafe3e5b040988adc083dceebf4e575508add93d068945dd13f1fd5
|
@@ -11,7 +11,7 @@ module Skylight::Core
|
|
11
11
|
adapter_name = normalize_adapter_name(payload[:adapter])
|
12
12
|
desc = "{ adapter: '#{adapter_name}', queue: '#{payload[:job].queue_name}' }"
|
13
13
|
|
14
|
-
trace
|
14
|
+
maybe_set_endpoint(trace, title)
|
15
15
|
|
16
16
|
[CAT, title, desc]
|
17
17
|
end
|
@@ -29,6 +29,16 @@ module Skylight::Core
|
|
29
29
|
rescue
|
30
30
|
"active_job"
|
31
31
|
end
|
32
|
+
|
33
|
+
def maybe_set_endpoint(trace, string)
|
34
|
+
trace.endpoint ||= string
|
35
|
+
|
36
|
+
# If a job is called using #perform_now inside a controller action
|
37
|
+
# or within another job's #perform method, we do not want this to
|
38
|
+
# overwrite the existing endpoint name (unless it is the default from ActiveJob).
|
39
|
+
return unless trace.endpoint == Skylight::Core::Probes::ActiveJob::Probe::TITLE
|
40
|
+
trace.endpoint = string
|
41
|
+
end
|
32
42
|
end
|
33
43
|
end
|
34
44
|
end
|
@@ -2,12 +2,14 @@ module Skylight::Core
|
|
2
2
|
module Probes
|
3
3
|
module ActiveJob
|
4
4
|
class Probe
|
5
|
+
TITLE = "ActiveJob.execute".freeze
|
6
|
+
|
5
7
|
def install
|
6
8
|
::ActiveJob::Base.instance_eval do
|
7
9
|
alias execute_without_sk execute
|
8
10
|
|
9
11
|
def execute(*args)
|
10
|
-
Skylight.trace(
|
12
|
+
Skylight.trace(TITLE, "app.job.execute") do |trace|
|
11
13
|
# See normalizers/active_job/perform for endpoint/segment assignment
|
12
14
|
begin
|
13
15
|
execute_without_sk(*args)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|