stack-service-base 0.0.76 → 0.0.77
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 +4 -4
- data/lib/stack-service-base/open_telemetry.rb +21 -2
- data/lib/stack-service-base/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f84cb064ccf3f6f83754e525d595d9902e8143ef279477c4a79e18252b3f72c4
|
|
4
|
+
data.tar.gz: 515133d93daa3d1282a81dae58cdd688d82d090a0639e66c3859254e9781d38d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b53b686eb180ea3001a7cc7506b2c57e7887985a4ac06ecb35553f4239b2bbfdb29c96626df8d2813594d9d8f390826c842dbef8e9c777fa60a79d5355829ba
|
|
7
|
+
data.tar.gz: 53f50ae84f7abb9c76b30a771de3cee5f1bc83ff8dc651f184c850a912065155bc3cd4e61e708eba1cb6e5bdc0973454ce90329cff876804b75ccc4d6c9a9217
|
|
@@ -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
|
|