stack-service-base 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 333dfdbe061e1a83f2b9271a54ae24336489e3ec41ef9fb605d85d457cc0ca1b
|
|
4
|
+
data.tar.gz: b45fe7a043608ba55c47b0221ac6673e20d65afd27cc9dec90294cd9a0bc14a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a3453756c2b111afa7c6418c31679a84d9b84f4f2714020ed4fa65f24faef1796220056f578744db06c634756685df2c6e2d5690206eac3c655988a9fd233d3
|
|
7
|
+
data.tar.gz: e510fa98848cd0a813be31e41f335a256ef100bbfeb6f740c3942db3459836afad53ac6d2911019b3b6d181ae034ffbcab3f6efe8622879469ffbc4fd00f96ed
|
|
@@ -37,9 +37,28 @@ if OTEL_ENABLED
|
|
|
37
37
|
require 'opentelemetry-exporter-otlp-logs'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
if false
|
|
41
|
+
# TODO: disable Faraday spans for the given Threads
|
|
42
|
+
# debug and test
|
|
43
|
+
|
|
44
|
+
if defined? OpenTelemetry::Instrumentation::Faraday::Middlewares::Stable::TracerMiddleware
|
|
45
|
+
class OpenTelemetry::Instrumentation::Faraday::Middlewares::Stable::TracerMiddlewareTracerMiddleware
|
|
46
|
+
alias_method :_original_call, :call
|
|
47
|
+
def call(env)
|
|
48
|
+
if Thread.current[:disable_faraday] == true
|
|
49
|
+
app.call env
|
|
50
|
+
else
|
|
51
|
+
_original_call(env)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
58
|
+
|
|
40
59
|
if defined? Async and OTEL_ENABLED
|
|
41
60
|
module AsyncTaskOTELPatch
|
|
42
|
-
def initialize(
|
|
61
|
+
def initialize(*pos, **kw, &block)
|
|
43
62
|
ctx_ = OpenTelemetry::Context.current
|
|
44
63
|
|
|
45
64
|
block_otl = ->(t, *arguments){
|
|
@@ -47,7 +66,7 @@ if defined? Async and OTEL_ENABLED
|
|
|
47
66
|
block.call t, *arguments
|
|
48
67
|
end
|
|
49
68
|
}
|
|
50
|
-
super
|
|
69
|
+
super(*pos, **kw, &block_otl)
|
|
51
70
|
end
|
|
52
71
|
end
|
|
53
72
|
|
|
@@ -191,6 +210,7 @@ def otl_span(name, attributes = {}, &block)
|
|
|
191
210
|
end
|
|
192
211
|
end
|
|
193
212
|
|
|
213
|
+
# otl_current_span { _1.def add_attributes(otl_traceparent_id: otl_traceparent_id) }
|
|
194
214
|
def otl_current_span
|
|
195
215
|
return unless OTEL_ENABLED && Otel.enabled
|
|
196
216
|
yield OpenTelemetry::Trace.current_span
|