microscope_tracer 0.2.0 → 0.2.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b0c98c2cf8a15c219626146226f03834945f9ce
|
4
|
+
data.tar.gz: f80f76a74f2a53f8dc690652430c0c4011121f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd45225cdf6e8b7ffe4855959839f626f3ac48d42fe80ec91019b4cab1e46522bb72b79f3e030ba7f3b8e33e7f1b7c431d35cce7180c40b20616229d40e3e933
|
7
|
+
data.tar.gz: 496835817807c8bce6dd38fa036fbd76eb447438c349db743fa1739a6115b1b68cd03de6087961e2b847a5304ce5bf4c5b85f62e78cab53ab974639a562482ea
|
@@ -17,12 +17,12 @@ class FaradayMiddleware < Faraday::Middleware
|
|
17
17
|
|
18
18
|
started_at = Time.now
|
19
19
|
|
20
|
-
@trace_logger.log_client_start(span)
|
20
|
+
@trace_logger.log_client_start(span,child_span_id)
|
21
21
|
|
22
22
|
|
23
23
|
@app.call(env).on_complete do |response_env|
|
24
24
|
duration = Time.now - started_at
|
25
|
-
@trace_logger.log_client_end(span,duration)
|
25
|
+
@trace_logger.log_client_end(span,child_span_id,duration)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -17,17 +17,17 @@ class TraceLogger
|
|
17
17
|
log(:server_end,span,{elapsedMillis:millis})
|
18
18
|
end
|
19
19
|
|
20
|
-
def log_client_start(span)
|
21
|
-
log(:client_start,span)
|
20
|
+
def log_client_start(span,child_span_id)
|
21
|
+
log(:client_start,span,{childSpanId:child_span_id})
|
22
22
|
end
|
23
23
|
|
24
|
-
def log_client_end(span,duration_in_seconds)
|
24
|
+
def log_client_end(span,child_span_id,duration_in_seconds)
|
25
25
|
millis = duration_in_seconds * 1000
|
26
|
-
log(:client_end,span,{elapsedMillis:millis})
|
26
|
+
log(:client_end,span,{childSpanId:child_span_id,elapsedMillis:millis})
|
27
27
|
end
|
28
28
|
|
29
29
|
def log(type,span,extras={})
|
30
|
-
fields = {service:@service_name,type:type,traceId:span.trace_id,spanId:span.span_id,
|
30
|
+
fields = {service:@service_name,type:type,traceId:span.trace_id,spanId:span.span_id,pSpanId:span.parent_span_id}.merge(extras)
|
31
31
|
line = fields.map{ |k,v| if v then "#{k}=\"#{v}\"" else nil end }.compact.join(" ")
|
32
32
|
|
33
33
|
@io.puts(@log_prefix + line)
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microscope_tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Hodgson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: request_store
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description:
|
@@ -59,7 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
-
|
62
|
+
- .gitignore
|
63
63
|
- Gemfile
|
64
64
|
- LICENSE.txt
|
65
65
|
- README.md
|
@@ -82,17 +82,17 @@ require_paths:
|
|
82
82
|
- lib
|
83
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - '>='
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- -
|
90
|
+
- - '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.0.14
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Logs Microscope-compliant trace entries and wrangles Microscope- HTTP headers.
|