google-cloud-trace 0.41.3 → 0.41.4

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: 1bf4b8064f4be89ea155e7b9cdd564e5084fef1dd5abd41e4c01e70ab8194854
4
- data.tar.gz: ea29cb8fd87df1b282e69ace53dd7bc8571de85a56507a3508ffc30ad9d7c813
3
+ metadata.gz: e5e76ca34605bc5bce0f235e5c07d9c269b78066a50ec6b1fa7f193db7eb499a
4
+ data.tar.gz: 8a4595b72e419d627a5c3a3a75932e79980f88e264c707bcb02b6b73911ed9f9
5
5
  SHA512:
6
- metadata.gz: 407239b9dc8b6ea0ead1910f1d09cd78c0c32d3300cd0389329d3c48a7c47921baf1c636515c1ed975248e58c1cbe6d683608b95be4999693475398b696e4380
7
- data.tar.gz: d95c4415b120ce14b91b0c8019049d4b2db6c7a3473d3e3feeeb8cc512941dd5396b14103bdb44c54b243dc889c751b78f2ab7ebba21293f6dc833fbf1421b76
6
+ metadata.gz: 7d485174652b1af1d5050ac9f4948348f2ba035dd6864075c59164bdab09419a79b10d789c7d55788446fbfd3190c8fef626bc1ce3fd8860b7a7a5f3121f9717
7
+ data.tar.gz: f05faeee499e0f9e2e590884e5df8c85741fdfe008f51520b9cc25c246c2f73da78d01bf8a39d0b02fd01c2790d6da17f049a3b163f80dfa85a9b2aa27e030ec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Release History
2
2
 
3
+ ### 0.41.4 (2022-05-27)
4
+
5
+ #### Bug Fixes
6
+
7
+ * normalize span time based on rails version
8
+ * wrap patched methods into class to ignore yard parsing
9
+
3
10
  ### 0.41.3 / 2021-07-08
4
11
 
5
12
  #### Documentation
@@ -92,8 +92,8 @@ module Google
92
92
  truncate_stack: REMOVE_NOTIFICATION_FRAMEWORK
93
93
  end
94
94
  cur_span.create_span event.name,
95
- start_time: event.time,
96
- end_time: event.end,
95
+ start_time: normalize_time(event.time),
96
+ end_time: normalize_time(event.end),
97
97
  labels: labels
98
98
  end
99
99
 
@@ -109,6 +109,19 @@ module Google
109
109
  end
110
110
  labels
111
111
  end
112
+
113
+ ##
114
+ # @private
115
+ #
116
+ # active support event's time is:
117
+ #
118
+ # - rails >= 7: timestamp in milliseconds
119
+ # - rails < 7: time
120
+ def self.normalize_time time_or_float
121
+ return time_or_float if Rails::VERSION::MAJOR < 7
122
+
123
+ Time.at time_or_float / 1000
124
+ end
112
125
  end
113
126
  end
114
127
  end
@@ -41,5 +41,8 @@ module GRPC
41
41
  end
42
42
 
43
43
  # Patch GRPC::ActiveCall#request_response method
44
- ::GRPC::ActiveCall.prepend ActiveCallWithTrace
44
+ # @private
45
+ class ActiveCall
46
+ prepend ActiveCallWithTrace
47
+ end
45
48
  end
@@ -84,6 +84,9 @@ module GRPC
84
84
  end
85
85
 
86
86
  # Patch GRPC::Core::Call#run_batch method
87
- ::GRPC::Core::Call.prepend CallWithTrace
87
+ # @private
88
+ class Call
89
+ prepend CallWithTrace
90
+ end
88
91
  end
89
92
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Trace
19
- VERSION = "0.41.3".freeze
19
+ VERSION = "0.41.4".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.41.3
4
+ version: 0.41.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-08 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -319,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubygems_version: 3.2.17
322
+ rubygems_version: 3.3.14
323
323
  signing_key:
324
324
  specification_version: 4
325
325
  summary: Application Instrumentation and API Client library for Stackdriver Trace