solarwinds_apm 6.1.0 → 6.1.2
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/README.md +49 -2
- 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 +219 -120
- data/lib/oboe_metal.rb +8 -4
- data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +0 -4
- data/lib/solarwinds_apm/api/custom_instrumentation.rb +80 -0
- data/lib/solarwinds_apm/api.rb +2 -0
- 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_dbo_utils.rb +35 -0
- data/lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb +25 -0
- data/lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb +39 -0
- data/lib/solarwinds_apm/patch/tag_sql_patch.rb +11 -0
- data/lib/solarwinds_apm/support.rb +0 -14
- data/lib/solarwinds_apm/version.rb +1 -1
- metadata +10 -12
- data/lib/solarwinds_apm/support/swomarginalia/LICENSE +0 -20
- data/lib/solarwinds_apm/support/swomarginalia/README.md +0 -46
- data/lib/solarwinds_apm/support/swomarginalia/comment.rb +0 -206
- data/lib/solarwinds_apm/support/swomarginalia/formatter.rb +0 -20
- data/lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb +0 -55
- data/lib/solarwinds_apm/support/swomarginalia/railtie.rb +0 -24
- data/lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb +0 -89
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
|
|
@@ -169,9 +169,5 @@ if defined?(SolarWindsAPM::Config)
|
|
169
169
|
# Example:
|
170
170
|
# SELECT `posts`.* FROM `posts` /*traceparent=00-a448f096d441e167d12ebd32a927c1a5-a29655a47e430119-01*/
|
171
171
|
#
|
172
|
-
# This option can add a small overhead for prepared statements since the traceparent value is unique per execution.
|
173
|
-
# This feature uses marginalia, see its caveat and possible workaround
|
174
|
-
# https://github.com/basecamp/marginalia/blob/master/README.md#prepared-statements
|
175
|
-
#
|
176
172
|
SolarWindsAPM::Config[:tag_sql] = false
|
177
173
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# © 2024 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 API
|
11
|
+
module Tracer
|
12
|
+
def self.included(base)
|
13
|
+
base.extend(ClassMethods)
|
14
|
+
end
|
15
|
+
|
16
|
+
module ClassMethods
|
17
|
+
# Helper method to instrument custom method
|
18
|
+
#
|
19
|
+
# `add_tracer` can add a custom span to the specified instance or class method that is already defined.
|
20
|
+
# It requires the custom span name and optionally takes the span kind and additional attributes
|
21
|
+
# in hash format.
|
22
|
+
#
|
23
|
+
# === Argument:
|
24
|
+
#
|
25
|
+
# * +method_name+ - (String) A non-empty string that match the method name that need to be instrumented
|
26
|
+
# * +span_name+ - (String, optional, default = method_name) A non-empty string that define the span name (default to method_name)
|
27
|
+
# * +options+ - (Hash, optional, default = {}) A hash with desired options include attributes and span kind e.g. {attributes: {}, kind: :consumer}
|
28
|
+
#
|
29
|
+
# === Example:
|
30
|
+
#
|
31
|
+
# class DogfoodsController < ApplicationController
|
32
|
+
# include SolarWindsAPM::API::Tracer
|
33
|
+
#
|
34
|
+
# def create
|
35
|
+
# @dogfood = Dogfood.new(params.permit(:brand, :name))
|
36
|
+
# @dogfood.save
|
37
|
+
# custom_method
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# def custom_method
|
41
|
+
# end
|
42
|
+
# add_tracer :custom_method, 'custom_name', { attributes: { 'foo' => 'bar' }, kind: :consumer }
|
43
|
+
#
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# class DogfoodsController < ApplicationController
|
47
|
+
# def create
|
48
|
+
# @dogfood = Dogfood.new(params.permit(:brand, :name))
|
49
|
+
# @dogfood.save
|
50
|
+
# custom_method
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# def self.custom_method
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# class << self
|
57
|
+
# include SolarWindsAPM::API::Tracer
|
58
|
+
# add_tracer :custom_method, 'custom_name', { attributes: { 'foo' => 'bar' }, kind: :consumer }
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# === Returns:
|
64
|
+
# * nil
|
65
|
+
#
|
66
|
+
def add_tracer(method_name, span_name = nil, options = {})
|
67
|
+
span_name = name.nil? ? "#{to_s.split(':').last&.tr('>', '')}/#{__method__}" : "#{name}/#{__method__}" if span_name.nil?
|
68
|
+
|
69
|
+
original_method = instance_method(method_name)
|
70
|
+
|
71
|
+
define_method(method_name) do |*args, &block|
|
72
|
+
SolarWindsAPM::API.in_span(span_name, **options) do |_span|
|
73
|
+
original_method.bind_call(self, *args, &block)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/solarwinds_apm/api.rb
CHANGED
@@ -11,6 +11,7 @@ require_relative 'api/current_trace_info'
|
|
11
11
|
require_relative 'api/tracing'
|
12
12
|
require_relative 'api/opentelemetry'
|
13
13
|
require_relative 'api/custom_metrics'
|
14
|
+
require_relative 'api/custom_instrumentation'
|
14
15
|
|
15
16
|
module SolarWindsAPM
|
16
17
|
module API
|
@@ -19,5 +20,6 @@ module SolarWindsAPM
|
|
19
20
|
extend SolarWindsAPM::API::Tracing
|
20
21
|
extend SolarWindsAPM::API::OpenTelemetry
|
21
22
|
extend SolarWindsAPM::API::CustomMetrics
|
23
|
+
extend SolarWindsAPM::API::Tracer
|
22
24
|
end
|
23
25
|
end
|
@@ -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,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module SolarWindsAPM
|
8
|
+
module Patch
|
9
|
+
module TagSql
|
10
|
+
module SWODboUtils
|
11
|
+
def self.annotate_span_and_sql(sql)
|
12
|
+
return sql if sql.to_s.empty?
|
13
|
+
|
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
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] annotated_sql: #{annotated_sql}" }
|
27
|
+
annotated_sql
|
28
|
+
rescue StandardError => e
|
29
|
+
SolarWindsAPM.logger.error { "[#{self.class}/#{__method__}] Failed to annotated sql. Error: #{e.message}" }
|
30
|
+
sql
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,25 @@
|
|
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
|
+
annotated_sql = ::SolarWindsAPM::Patch::TagSql::SWODboUtils.annotate_span_and_sql(sql)
|
15
|
+
super(annotated_sql, options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# need to prepend before mysql2 instrumentation prepend the original function
|
23
|
+
# after entire process, the call sequence will be:
|
24
|
+
# upstream instrumentation -> our patch -> original function
|
25
|
+
Mysql2::Client.prepend(SolarWindsAPM::Patch::TagSql::SWOMysql2Patch) if defined?(Mysql2::Client)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright The OpenTelemetry Authors
|
4
|
+
#
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
6
|
+
|
7
|
+
module SolarWindsAPM
|
8
|
+
module Patch
|
9
|
+
module TagSql
|
10
|
+
module SWOPgPatch
|
11
|
+
# We target operations covered by the upstream pg instrumentation.
|
12
|
+
# These are all alike in that they will have a SQL
|
13
|
+
# statement as the first parameter, and they are all
|
14
|
+
# non-prepared statement execute.
|
15
|
+
EXEC_ISH_METHODS = %i[
|
16
|
+
exec
|
17
|
+
query
|
18
|
+
sync_exec
|
19
|
+
async_exec
|
20
|
+
exec_params
|
21
|
+
async_exec_params
|
22
|
+
sync_exec_params
|
23
|
+
].freeze
|
24
|
+
|
25
|
+
EXEC_ISH_METHODS.each do |method|
|
26
|
+
define_method method do |*args|
|
27
|
+
annotated_sql = ::SolarWindsAPM::Patch::TagSql::SWODboUtils.annotate_span_and_sql(args[0])
|
28
|
+
args[0] = annotated_sql
|
29
|
+
super(*args)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# need to prepend before pg instrumentation patch itself
|
38
|
+
# upstream instrumentation -> our patch -> original function
|
39
|
+
PG::Connection.prepend(SolarWindsAPM::Patch::TagSql::SWOPgPatch) if defined?(PG::Connection)
|
@@ -0,0 +1,11 @@
|
|
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_dbo_utils'
|
10
|
+
require_relative 'tag_sql/sw_mysql2_patch'
|
11
|
+
require_relative 'tag_sql/sw_pg_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,17 +1,17 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maia Engeli
|
8
8
|
- Peter Giacomo Lombardo
|
9
9
|
- Spiros Eliopoulos
|
10
10
|
- Xuan Cao
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: opentelemetry-instrumentation-all
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/solarwinds_apm.rb
|
75
75
|
- lib/solarwinds_apm/api.rb
|
76
76
|
- lib/solarwinds_apm/api/current_trace_info.rb
|
77
|
+
- lib/solarwinds_apm/api/custom_instrumentation.rb
|
77
78
|
- lib/solarwinds_apm/api/custom_metrics.rb
|
78
79
|
- lib/solarwinds_apm/api/opentelemetry.rb
|
79
80
|
- lib/solarwinds_apm/api/tracing.rb
|
@@ -100,6 +101,10 @@ files:
|
|
100
101
|
- lib/solarwinds_apm/otel_lambda_config.rb
|
101
102
|
- lib/solarwinds_apm/patch.rb
|
102
103
|
- lib/solarwinds_apm/patch/dummy_patch.rb
|
104
|
+
- lib/solarwinds_apm/patch/tag_sql/sw_dbo_utils.rb
|
105
|
+
- lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb
|
106
|
+
- lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb
|
107
|
+
- lib/solarwinds_apm/patch/tag_sql_patch.rb
|
103
108
|
- lib/solarwinds_apm/support.rb
|
104
109
|
- lib/solarwinds_apm/support/logger_formatter.rb
|
105
110
|
- lib/solarwinds_apm/support/logging_log_event.rb
|
@@ -107,13 +112,6 @@ files:
|
|
107
112
|
- lib/solarwinds_apm/support/oboe_tracing_mode.rb
|
108
113
|
- lib/solarwinds_apm/support/service_key_checker.rb
|
109
114
|
- lib/solarwinds_apm/support/support_report.rb
|
110
|
-
- lib/solarwinds_apm/support/swomarginalia/LICENSE
|
111
|
-
- lib/solarwinds_apm/support/swomarginalia/README.md
|
112
|
-
- lib/solarwinds_apm/support/swomarginalia/comment.rb
|
113
|
-
- lib/solarwinds_apm/support/swomarginalia/formatter.rb
|
114
|
-
- lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb
|
115
|
-
- lib/solarwinds_apm/support/swomarginalia/railtie.rb
|
116
|
-
- lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb
|
117
115
|
- lib/solarwinds_apm/support/transaction_cache.rb
|
118
116
|
- lib/solarwinds_apm/support/transaction_settings.rb
|
119
117
|
- lib/solarwinds_apm/support/txn_name_manager.rb
|
@@ -129,7 +127,7 @@ metadata:
|
|
129
127
|
homepage_uri: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
130
128
|
source_code_uri: https://github.com/solarwinds/apm-ruby
|
131
129
|
rubygems_mfa_required: 'true'
|
132
|
-
post_install_message:
|
130
|
+
post_install_message:
|
133
131
|
rdoc_options: []
|
134
132
|
require_paths:
|
135
133
|
- lib
|
@@ -145,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
143
|
version: '0'
|
146
144
|
requirements: []
|
147
145
|
rubygems_version: 3.3.27
|
148
|
-
signing_key:
|
146
|
+
signing_key:
|
149
147
|
specification_version: 4
|
150
148
|
summary: SolarWindsAPM performance instrumentation gem for Ruby
|
151
149
|
test_files: []
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# Copyright (c) 2012 37signals, LLC
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
# a copy of this software and associated documentation files (the
|
5
|
-
# "Software"), to deal in the Software without restriction, including
|
6
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
# the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be
|
12
|
-
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# swomarginalia
|
2
|
-
|
3
|
-
This folder contains the code that is copied from original [marginalia](https://github.com/basecamp/marginalia)
|
4
|
-
|
5
|
-
## File structure
|
6
|
-
|
7
|
-
```console
|
8
|
-
|-- swomarginalia
|
9
|
-
| |-- LICENSE
|
10
|
-
| |-- README.md
|
11
|
-
| |-- comment.rb
|
12
|
-
| |-- railtie.rb
|
13
|
-
| |-- load_swomarginalia.rb
|
14
|
-
| `-- swomarginalia.rb
|
15
|
-
```
|
16
|
-
|
17
|
-
## Modification
|
18
|
-
|
19
|
-
### railitie.rb
|
20
|
-
|
21
|
-
1. Moved prepend logic into load_swomarginalia.rb in case that non-rails app using activerecord
|
22
|
-
|
23
|
-
### swomarginlia.rb
|
24
|
-
|
25
|
-
1. Removed the alias_method to achieve function override; instead, we use prepend.
|
26
|
-
2. Added step of cleaning-up previous transparent comments
|
27
|
-
|
28
|
-
### comment.rb
|
29
|
-
|
30
|
-
1. Added the traceparent comment (trace string constructed based on opentelemetry)
|
31
|
-
|
32
|
-
### load_swomarginalia.rb
|
33
|
-
|
34
|
-
1. (new file) prepend the ActiveRecordInstrumentation to activerecord adapter
|
35
|
-
|
36
|
-
## Example
|
37
|
-
|
38
|
-
### Sample output of rails application
|
39
|
-
|
40
|
-
```console
|
41
|
-
Post Load (1.1ms) SELECT `posts`.* FROM `posts` /*application=SqlcommenterRailsDemo,controller=posts,action=index,traceparent=00-a448f096d441e167d12ebd32a927c1a5-a29655a47e430119-01*/
|
42
|
-
```
|
43
|
-
|
44
|
-
## License
|
45
|
-
|
46
|
-
This project is licensed under the [MIT License](https://github.com/solarwinds/apm-ruby/blob/main/lib/solarwinds_apm/support/swomarginalia/LICENSE).
|