solarwinds_apm 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/oboe_metal/extconf.rb +15 -9
- data/ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-lambda-aarch64.so.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256 +1 -1
- data/ext/oboe_metal/src/VERSION +1 -1
- data/ext/oboe_metal/src/oboe.h +2 -1
- data/ext/oboe_metal/src/oboe_api.cpp +5 -3
- data/ext/oboe_metal/src/oboe_api.h +2 -1
- data/ext/oboe_metal/src/oboe_swig_wrap.cc +11 -3
- data/lib/oboe_metal.rb +8 -4
- data/lib/solarwinds_apm/oboe_init_options.rb +14 -1
- data/lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb +2 -2
- data/lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb +4 -3
- data/lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb +2 -0
- data/lib/solarwinds_apm/otel_config.rb +10 -0
- data/lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb +36 -0
- data/lib/solarwinds_apm/patch/tag_sql_patch.rb +9 -0
- data/lib/solarwinds_apm/support.rb +0 -14
- data/lib/solarwinds_apm/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ab7453d8ca9dc042ac880b99dd8cd11d6344e3372bb84b2fab1e6b4fa3d65ab
|
4
|
+
data.tar.gz: '009803a9d3ad0f678824c57dca3031ef3b9f79989c00fecb16946962cb641f1e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d80d9759f1050927d249d9ac1264eb6bd5407603cf2fee8c09ce27137c6b39773ea3f7b57dd7e5c428890a9ee27f7ba1cc02d20672bef43cfb0470f04de0b70c
|
7
|
+
data.tar.gz: 664ade107e0f49a1709d0d5b87012ea6766094d469b3942afb10100a63c066735f512bb7d2aafae5925b99f4a305f4d2f2a31101090f3bddeee68e722e6efafd
|
data/ext/oboe_metal/extconf.rb
CHANGED
@@ -18,20 +18,17 @@ CONFIG['warnflags'] = CONFIG['warnflags'].gsub('-Wdeclaration-after-statement',
|
|
18
18
|
init_mkmf(CONFIG)
|
19
19
|
|
20
20
|
ext_dir = __dir__
|
21
|
-
|
22
|
-
non_production =
|
21
|
+
oboe_env = ENV.fetch('OBOE_ENV', nil)
|
22
|
+
non_production = %w[dev stg].include? oboe_env.to_s
|
23
23
|
|
24
24
|
swo_lib_dir = File.join(ext_dir, 'lib')
|
25
25
|
version = File.read(File.join(ext_dir, 'src', 'VERSION')).strip
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
swo_path = File.join('https://agent-binaries.cloud.solarwinds.com/apm/c-lib/', version, 'relwithdebinfo')
|
30
|
-
puts 'Fetching c-lib from PRODUCTION DEBUG Build'
|
31
|
-
elsif ENV['OBOE_DEV'].to_s.casecmp('true').zero?
|
27
|
+
case oboe_env
|
28
|
+
when 'dev'
|
32
29
|
swo_path = 'https://solarwinds-apm-staging.s3.us-west-2.amazonaws.com/apm/c-lib/nightly'
|
33
30
|
puts 'Fetching c-lib from DEVELOPMENT Build'
|
34
|
-
|
31
|
+
when 'stg'
|
35
32
|
swo_path = File.join('https://agent-binaries.global.st-ssp.solarwinds.com/apm/c-lib/', version)
|
36
33
|
puts 'Fetching c-lib from STAGING Build'
|
37
34
|
else
|
@@ -39,6 +36,15 @@ else
|
|
39
36
|
puts 'Fetching c-lib from PRODUCTION Build'
|
40
37
|
end
|
41
38
|
|
39
|
+
oboe_debug = ENV['OBOE_DEBUG'].to_s.casecmp('true').zero?
|
40
|
+
|
41
|
+
if oboe_debug
|
42
|
+
swo_path = File.join(swo_path, 'relwithdebinfo')
|
43
|
+
puts "Fetching DEBUG Build based on #{oboe_env.to_s.empty? ? 'prod' : oboe_env}"
|
44
|
+
end
|
45
|
+
|
46
|
+
puts "final swo_path: #{swo_path}"
|
47
|
+
|
42
48
|
swo_arch = 'x86_64'
|
43
49
|
system_arch = `uname -m` # for mac, the command is `uname` # "Darwin\n"; try `uname -a`
|
44
50
|
system_arch.delete!("\n")
|
@@ -120,7 +126,7 @@ if success
|
|
120
126
|
dir_config('oboe', 'src', 'lib')
|
121
127
|
|
122
128
|
# create Makefile
|
123
|
-
if have_library('oboe'
|
129
|
+
if have_library('oboe')
|
124
130
|
$libs = append_library($libs, 'oboe')
|
125
131
|
$libs = append_library($libs, 'stdc++')
|
126
132
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
53295ec020a713c5f6fe7c14b150a10ac7db0e5ea692fbd6945ee69f7a581271
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
37407ece6aafcb662fbce8eb23f98a9b017154c66c8ec02eda835702ba14f446
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
925d65c2a940a82315525ea2e82eb357793f7db8a2a8ec529e7c03e2478bc965
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3d49133827a0b6839744231e3ca49f8c9340380063286b8c3794bde585370001
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
e2198827ce86309a59def33be14f17d0474477df33a5d75bd415d73a01c790b3
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
798a7c9551c66af743e1d6d2b736bf5667fa97fdc0ac8eec825fe4f63adaa044
|
data/ext/oboe_metal/src/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
15.0.
|
1
|
+
15.0.3
|
data/ext/oboe_metal/src/oboe.h
CHANGED
@@ -161,7 +161,7 @@ typedef struct oboe_metric_tag {
|
|
161
161
|
} oboe_metric_tag_t;
|
162
162
|
|
163
163
|
typedef struct oboe_init_options {
|
164
|
-
int version; // the version of this structure (currently on version
|
164
|
+
int version; // the version of this structure (currently on version 17)
|
165
165
|
const char *hostname_alias; // optional hostname alias
|
166
166
|
int log_level; // level at which log messages will be written to log file (0-6)
|
167
167
|
// use OBOE_INIT_LOG_LEVEL_INFO(3) for default log level
|
@@ -188,6 +188,7 @@ typedef struct oboe_init_options {
|
|
188
188
|
// only used in lambda reporter (off=0, on=1, default off)
|
189
189
|
int metric_format; // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
190
190
|
int log_type; // log type (0 = stderr; 1 = stdout; 2 = file; 3 = null; 4 = disabled; default = 0)
|
191
|
+
int defer_init; // defer init (0 = disable; 1 = enabled, parent process will not init oboe but fork child process will init oboe; default = 0)
|
191
192
|
} oboe_init_options_t;
|
192
193
|
|
193
194
|
typedef struct oboe_span_params {
|
@@ -587,11 +587,12 @@ Reporter::Reporter(
|
|
587
587
|
int stdout_clear_nonblocking, // flag indicating if the O_NONBLOCK flag on stdout should be cleared,
|
588
588
|
// only used in lambda reporter (off=0, on=1, default off)
|
589
589
|
int metric_format, // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
590
|
-
int log_type
|
590
|
+
int log_type, // log type (0 = stderr; 1 = stdout; 2 = file; 3 = null; 4 = disabled; default = 0)
|
591
|
+
int defer_init // defer init (0 = disable; 1 = enabled, parent process will not init oboe but fork child process will init oboe; default = 0)
|
591
592
|
) {
|
592
593
|
oboe_init_options_t options;
|
593
594
|
memset(&options, 0, sizeof(options));
|
594
|
-
options.version =
|
595
|
+
options.version = 17;
|
595
596
|
oboe_init_options_set_defaults(&options);
|
596
597
|
|
597
598
|
if (hostname_alias != "") {
|
@@ -628,6 +629,7 @@ Reporter::Reporter(
|
|
628
629
|
options.stdout_clear_nonblocking = stdout_clear_nonblocking;
|
629
630
|
options.metric_format = metric_format;
|
630
631
|
options.log_type = log_type;
|
632
|
+
options.defer_init = defer_init;
|
631
633
|
init_status = oboe_init(&options);
|
632
634
|
}
|
633
635
|
|
@@ -694,7 +696,7 @@ std::string Config::getVersionString() {
|
|
694
696
|
OboeAPI::OboeAPI(const OboeAPIOptions& options) {
|
695
697
|
oboe_init_options_t oboe_options;
|
696
698
|
memset(&oboe_options, 0, sizeof(oboe_options));
|
697
|
-
oboe_options.version =
|
699
|
+
oboe_options.version = 17;
|
698
700
|
oboe_init_options_set_defaults(&oboe_options);
|
699
701
|
oboe_options.log_level = options.logging_options.level;
|
700
702
|
oboe_options.log_type = options.logging_options.type;
|
@@ -463,7 +463,8 @@ class Reporter : private oboe_reporter_t {
|
|
463
463
|
int stdout_clear_nonblocking, // flag indicating if the O_NONBLOCK flag on stdout should be cleared,
|
464
464
|
// only used in lambda reporter (off=0, on=1, default off)
|
465
465
|
int metric_format, // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
466
|
-
int log_type
|
466
|
+
int log_type, // log type (0 = stderr; 1 = stdout; 2 = file; 3 = null; 4 = disabled; default = 0)
|
467
|
+
int defer_init // defer init (0 = disable; 1 = enabled, parent process will not init oboe but fork child process will init oboe; default = 0)
|
467
468
|
);
|
468
469
|
|
469
470
|
~Reporter();
|
@@ -6870,6 +6870,7 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
6870
6870
|
int arg20 ;
|
6871
6871
|
int arg21 ;
|
6872
6872
|
int arg22 ;
|
6873
|
+
int arg23 ;
|
6873
6874
|
int val2 ;
|
6874
6875
|
int ecode2 = 0 ;
|
6875
6876
|
int val4 ;
|
@@ -6900,10 +6901,12 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
6900
6901
|
int ecode21 = 0 ;
|
6901
6902
|
int val22 ;
|
6902
6903
|
int ecode22 = 0 ;
|
6904
|
+
int val23 ;
|
6905
|
+
int ecode23 = 0 ;
|
6903
6906
|
Reporter *result = 0 ;
|
6904
6907
|
|
6905
|
-
if ((argc <
|
6906
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
6908
|
+
if ((argc < 23) || (argc > 23)) {
|
6909
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 23)",argc); SWIG_fail;
|
6907
6910
|
}
|
6908
6911
|
{
|
6909
6912
|
std::string *ptr = (std::string *)0;
|
@@ -7043,7 +7046,12 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
7043
7046
|
SWIG_exception_fail(SWIG_ArgError(ecode22), Ruby_Format_TypeError( "", "int","Reporter", 22, argv[21] ));
|
7044
7047
|
}
|
7045
7048
|
arg22 = static_cast< int >(val22);
|
7046
|
-
|
7049
|
+
ecode23 = SWIG_AsVal_int(argv[22], &val23);
|
7050
|
+
if (!SWIG_IsOK(ecode23)) {
|
7051
|
+
SWIG_exception_fail(SWIG_ArgError(ecode23), Ruby_Format_TypeError( "", "int","Reporter", 23, argv[22] ));
|
7052
|
+
}
|
7053
|
+
arg23 = static_cast< int >(val23);
|
7054
|
+
result = (Reporter *)new Reporter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23);
|
7047
7055
|
DATA_PTR(self) = result;
|
7048
7056
|
return self;
|
7049
7057
|
fail:
|
data/lib/oboe_metal.rb
CHANGED
@@ -14,9 +14,10 @@ module SolarWindsAPM
|
|
14
14
|
@loaded = false
|
15
15
|
@reporter = nil
|
16
16
|
@oboe_api = nil
|
17
|
+
@init_sent = false
|
17
18
|
|
18
19
|
class << self
|
19
|
-
attr_accessor :reporter, :loaded, :oboe_api
|
20
|
+
attr_accessor :reporter, :loaded, :oboe_api, :init_sent
|
20
21
|
|
21
22
|
def sample_rate(rate)
|
22
23
|
return unless SolarWindsAPM.loaded
|
@@ -38,7 +39,7 @@ module SolarWindsAPM
|
|
38
39
|
options = SolarWindsAPM::OboeInitOptions.instance.array_for_oboe # creates an array with the options in the right order
|
39
40
|
SolarWindsAPM.reporter = Oboe_metal::Reporter.new(*options)
|
40
41
|
SolarWindsAPM.loaded = true
|
41
|
-
report_init
|
42
|
+
report_init if (options[22]).zero? # report init at beginning if no after fork enabled
|
42
43
|
rescue StandardError => e
|
43
44
|
warn e.message
|
44
45
|
SolarWindsAPM.loaded = false
|
@@ -70,12 +71,15 @@ module SolarWindsAPM
|
|
70
71
|
# layer.
|
71
72
|
#
|
72
73
|
def report_init(layer = :rack) # :nodoc:
|
73
|
-
# Don't send __Init in test or if SolarWindsAPM
|
74
|
-
#
|
74
|
+
# Don't send __Init in test or if SolarWindsAPM isn't fully loaded (e.g. missing c-extension)
|
75
|
+
# or if already sent (e.g. SolarWindsAPM.init_sent = true)
|
76
|
+
return if SolarWindsAPM.init_sent
|
75
77
|
return unless SolarWindsAPM.loaded
|
76
78
|
|
77
79
|
platform_info = build_swo_init_report
|
78
80
|
log_init(layer, platform_info)
|
81
|
+
|
82
|
+
SolarWindsAPM.init_sent = true
|
79
83
|
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] Init message has been sent." }
|
80
84
|
end
|
81
85
|
|
@@ -67,6 +67,8 @@ module SolarWindsAPM
|
|
67
67
|
@metric_format = determine_the_metric_model
|
68
68
|
# log type (0 = stderr; 1 = stdout; 2 = file; 3 = null; 4 = disabled; default = 0)
|
69
69
|
@log_type = determine_oboe_log_type
|
70
|
+
# after fork enablement (0 = disable; 1 = enabled, parent process will not init oboe but fork child process will init oboe; default = 0)
|
71
|
+
@after_fork = determine_oboe_after_fork
|
70
72
|
end
|
71
73
|
|
72
74
|
# for testing with changed ENV vars
|
@@ -97,7 +99,8 @@ module SolarWindsAPM
|
|
97
99
|
@grpc_proxy, # 18
|
98
100
|
0, # 19 arg for lambda (no lambda for ruby yet)
|
99
101
|
@metric_format, # 20
|
100
|
-
@log_type
|
102
|
+
@log_type, # 21
|
103
|
+
@after_fork # 22
|
101
104
|
]
|
102
105
|
end
|
103
106
|
|
@@ -176,8 +179,14 @@ module SolarWindsAPM
|
|
176
179
|
(allowed_uri.include? ENV.fetch('SW_APM_COLLECTOR', nil))
|
177
180
|
end
|
178
181
|
|
182
|
+
def java_collector?(uri)
|
183
|
+
java_collector_regex = /java-collector:\d+/
|
184
|
+
uri.match?(java_collector_regex)
|
185
|
+
end
|
186
|
+
|
179
187
|
def sanitize_collector_uri(uri)
|
180
188
|
return uri if uri.nil? || uri.empty?
|
189
|
+
return uri if java_collector?(uri)
|
181
190
|
|
182
191
|
begin
|
183
192
|
sanitized_uri = ::URI.parse("http://#{uri}").host
|
@@ -205,5 +214,9 @@ module SolarWindsAPM
|
|
205
214
|
true
|
206
215
|
end
|
207
216
|
end
|
217
|
+
|
218
|
+
def determine_oboe_after_fork
|
219
|
+
ENV['SW_APM_ENABLE_AFTER_FORK'].to_s == 'true' ? 1 : 0
|
220
|
+
end
|
208
221
|
end
|
209
222
|
end
|
@@ -30,7 +30,7 @@ module SolarWindsAPM
|
|
30
30
|
# started span.
|
31
31
|
def on_start(span, parent_context)
|
32
32
|
SolarWindsAPM.logger.debug do
|
33
|
-
"[#{self.class}/#{__method__}] processor on_start span: #{span.inspect}, parent_context: #{parent_context.inspect}"
|
33
|
+
"[#{self.class}/#{__method__}] processor on_start span: #{span.to_span_data.inspect}, parent_context: #{parent_context.inspect}"
|
34
34
|
end
|
35
35
|
|
36
36
|
return if non_entry_span(parent_context: parent_context)
|
@@ -47,7 +47,7 @@ module SolarWindsAPM
|
|
47
47
|
#
|
48
48
|
# @param [Span] span the {Span} that just ended.
|
49
49
|
def on_finish(span)
|
50
|
-
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] processor on_finish span: #{span.inspect}" }
|
50
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] processor on_finish span: #{span.to_span_data.inspect}" }
|
51
51
|
|
52
52
|
return if non_entry_span(span: span)
|
53
53
|
|
@@ -35,9 +35,10 @@ module SolarWindsAPM
|
|
35
35
|
def inject(carrier, context: ::OpenTelemetry::Context.current,
|
36
36
|
setter: ::OpenTelemetry::Context::Propagation.text_map_setter)
|
37
37
|
span_context = ::OpenTelemetry::Trace.current_span(context).context
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
|
39
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] context current_span: #{context.instance_variable_get(:@entries)&.values&.first.inspect}" }
|
40
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] span_context: #{span_context.inspect}" }
|
41
|
+
|
41
42
|
return unless span_context&.valid?
|
42
43
|
|
43
44
|
x_trace = Utils.traceparent_from_context(span_context)
|
@@ -55,6 +55,8 @@ module SolarWindsAPM
|
|
55
55
|
attributes: #{attributes}"
|
56
56
|
end
|
57
57
|
|
58
|
+
SolarWindsAPM::Reporter.send(:report_init) # This only happens if after_fork enabled
|
59
|
+
|
58
60
|
parent_span_context = ::OpenTelemetry::Trace.current_span(parent_context).context
|
59
61
|
xtraceoptions = ::SolarWindsAPM::XTraceOptions.new(parent_context)
|
60
62
|
SolarWindsAPM.logger.debug do
|
@@ -111,6 +111,9 @@ module SolarWindsAPM
|
|
111
111
|
ENV['OTEL_LOG_LEVEL'] = SolarWindsAPM::Config::SW_LOG_LEVEL_MAPPING.dig(log_level, :otel)
|
112
112
|
end
|
113
113
|
|
114
|
+
# for dbo, traceparent injection as comments
|
115
|
+
require_relative 'patch/tag_sql_patch' if SolarWindsAPM::Config[:tag_sql]
|
116
|
+
|
114
117
|
::OpenTelemetry::SDK.configure { |c| c.use_all(@@config_map) }
|
115
118
|
|
116
119
|
validate_propagator(::OpenTelemetry.propagation.instance_variable_get(:@propagators))
|
@@ -126,6 +129,13 @@ module SolarWindsAPM
|
|
126
129
|
|
127
130
|
# configure sampler afterwards
|
128
131
|
::OpenTelemetry.tracer_provider.sampler = @@config[:sampler]
|
132
|
+
|
133
|
+
if ENV['SW_APM_AUTO_CONFIGURE'] == 'false'
|
134
|
+
SolarWindsAPM.logger.info '==================================================================='
|
135
|
+
SolarWindsAPM.logger.info "\e[1mSolarWindsAPM manual initialization was successful.\e[0m"
|
136
|
+
SolarWindsAPM.logger.info '==================================================================='
|
137
|
+
end
|
138
|
+
|
129
139
|
nil
|
130
140
|
end
|
131
141
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
8
|
+
|
9
|
+
module SolarWindsAPM
|
10
|
+
module Patch
|
11
|
+
module TagSql
|
12
|
+
module SWOMysql2Patch
|
13
|
+
def query(sql, options = {})
|
14
|
+
current_span = ::OpenTelemetry::Trace.current_span
|
15
|
+
|
16
|
+
annotated_sql = ''
|
17
|
+
if current_span.context.trace_flags.sampled?
|
18
|
+
traceparent = SolarWindsAPM::Utils.traceparent_from_context(current_span.context)
|
19
|
+
annotated_traceparent = "/*traceparent='#{traceparent}'*/"
|
20
|
+
current_span.add_attributes({ 'sw.query_tag' => annotated_traceparent })
|
21
|
+
annotated_sql = "#{sql} #{annotated_traceparent}"
|
22
|
+
else
|
23
|
+
annotated_sql = sql
|
24
|
+
end
|
25
|
+
|
26
|
+
super(annotated_sql, options)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# need to prepend before mysql2 instrumentation prepend the original function
|
34
|
+
# after entire process, the call sequence will be:
|
35
|
+
# upstream instrumentation -> our patch -> original function
|
36
|
+
Mysql2::Client.prepend(SolarWindsAPM::Patch::TagSql::SWOMysql2Patch) if defined?(Mysql2::Client)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
8
|
+
|
9
|
+
require_relative 'tag_sql/sw_mysql2_patch'
|
@@ -18,17 +18,3 @@ require_relative 'support/txn_name_manager'
|
|
18
18
|
require_relative 'support/utils'
|
19
19
|
require_relative 'support/x_trace_options'
|
20
20
|
require_relative 'support/support_report'
|
21
|
-
|
22
|
-
if SolarWindsAPM::Config[:tag_sql]
|
23
|
-
if defined?(Rails)
|
24
|
-
if Rails.version < '7'
|
25
|
-
require_relative 'support/swomarginalia/railtie'
|
26
|
-
else
|
27
|
-
require_relative 'support/swomarginalia/comment'
|
28
|
-
require_relative 'support/swomarginalia/formatter' if Rails.version <= '7.1'
|
29
|
-
end
|
30
|
-
elsif defined?(ActiveRecord)
|
31
|
-
require_relative 'support/swomarginalia/load_swomarginalia'
|
32
|
-
SolarWindsAPM::SWOMarginalia::LoadSWOMarginalia.insert
|
33
|
-
end
|
34
|
-
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solarwinds_apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maia Engeli
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-09
|
14
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: opentelemetry-instrumentation-all
|
@@ -100,6 +100,8 @@ files:
|
|
100
100
|
- lib/solarwinds_apm/otel_lambda_config.rb
|
101
101
|
- lib/solarwinds_apm/patch.rb
|
102
102
|
- lib/solarwinds_apm/patch/dummy_patch.rb
|
103
|
+
- lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb
|
104
|
+
- lib/solarwinds_apm/patch/tag_sql_patch.rb
|
103
105
|
- lib/solarwinds_apm/support.rb
|
104
106
|
- lib/solarwinds_apm/support/logger_formatter.rb
|
105
107
|
- lib/solarwinds_apm/support/logging_log_event.rb
|