utrace 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/utrace/none.rb +7 -1
- data/lib/utrace/otel.rb +4 -0
- data/lib/utrace/version.rb +1 -1
- data/lib/utrace.rb +4 -0
- 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: 7f5f8e1fc691a3e740ded9d5e84c646ff95fafeb3b414a57cafcbd8e7afac4ea
|
4
|
+
data.tar.gz: a2d795a1f147cce99ac1e00ebfb471428c7112521f25f469cd24d186eb4f2dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 814c631c00744632ac7428e54fdde2491642de2e0232338a88765b00a3c46e453fa068eaeccdedfa93f734bbf86b2b583396f2d138314dbaeaef73abf10ad3fb
|
7
|
+
data.tar.gz: 7ca000aecb5785ca287eee4da0caf61bac96e828e2902d27c29ab93219dfe7744ea7b09a0fc594f39484e3dab896b3d582858723359fbcef6b4a1b6b5aeb91fe
|
data/README.md
CHANGED
@@ -33,13 +33,13 @@ Make instrumentation
|
|
33
33
|
|
34
34
|
```ruby
|
35
35
|
Utrace.new_span('slow-query') do
|
36
|
-
Utrace.
|
37
|
-
Utrace.
|
36
|
+
Utrace.attrs({user_id: 123})
|
37
|
+
Utrace.event('step-1-start')
|
38
38
|
# ...
|
39
|
-
Utrace.
|
39
|
+
Utrace.event('step-2-start')
|
40
40
|
# ...
|
41
41
|
rescue => e
|
42
|
-
Utrace.
|
42
|
+
Utrace.error(e)
|
43
43
|
end
|
44
44
|
```
|
45
45
|
|
data/lib/utrace/none.rb
CHANGED
data/lib/utrace/otel.rb
CHANGED
@@ -8,6 +8,10 @@ module Utrace
|
|
8
8
|
@tracer.in_span(name.to_s) { |_span| block.call }
|
9
9
|
end
|
10
10
|
|
11
|
+
def untraced(&block)
|
12
|
+
::OpenTelemetry::Common::Utilities.untraced(&block)
|
13
|
+
end
|
14
|
+
|
11
15
|
def event(name, attrs: nil)
|
12
16
|
::OpenTelemetry::Trace.current_span.add_event(name, attributes: validate_attrs(attrs))
|
13
17
|
end
|
data/lib/utrace/version.rb
CHANGED
data/lib/utrace.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|