uptrace 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uptrace/id_generator.rb +4 -4
- data/lib/uptrace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94eb656b6d3d4a34ffd82f07b8241283ac0df131a1830dbaab1e267151efe26
|
4
|
+
data.tar.gz: c3992f5a354ee5377578526ffa523373d7623752ad6d61a700a8e8725e6486bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29fea8f23477b55985c87e813342e08899f7f1182f535b3d4f868c5eaaf5ae97cdee203b4f5f9fb89c1544bc24861d7dd91ac9fa2c9e53fc215ec234c2cb8d95
|
7
|
+
data.tar.gz: ab741518c70fb6f755c0b7e4ce5805bc8448f3ece174862b8305275cf2b04349555a6abcc0f0bc4acfc72c805c1fe1782e3d2a8e1f068b6eb5f8202dae5eaf01
|
data/lib/uptrace/id_generator.rb
CHANGED
@@ -20,8 +20,8 @@ module Uptrace
|
|
20
20
|
#
|
21
21
|
# @return [String] a valid trace ID.
|
22
22
|
def generate_trace_id
|
23
|
-
time = (Time.now.to_f *
|
24
|
-
high = [time
|
23
|
+
time = (Time.now.to_f * 1_000_000_000).to_i
|
24
|
+
high = [time >> 32, time & 0xFFFFFFFF].pack('NN')
|
25
25
|
low = RANDOM.bytes(8)
|
26
26
|
high << low
|
27
27
|
end
|
@@ -32,8 +32,8 @@ module Uptrace
|
|
32
32
|
# @return [String] a valid span ID.
|
33
33
|
def generate_span_id
|
34
34
|
time = (Time.now.to_f * 1000).to_i
|
35
|
-
high =
|
36
|
-
low =
|
35
|
+
high = [time].pack('N')
|
36
|
+
low = RANDOM.bytes(4)
|
37
37
|
high << low
|
38
38
|
end
|
39
39
|
end
|
data/lib/uptrace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uptrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uptrace Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10
|
11
|
+
date: 2022-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-exporter-otlp
|