solarwinds_apm 6.0.0.prev6 → 6.0.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 +43 -42
- 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 -0
- data/ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256 +1 -0
- 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 +3 -0
- data/ext/oboe_metal/src/oboe_api.cpp +1 -1
- data/lib/oboe_metal.rb +46 -84
- data/lib/rails/generators/solarwinds_apm/install_generator.rb +21 -19
- data/lib/solarwinds_apm/api/current_trace_info.rb +16 -9
- data/lib/solarwinds_apm/api/custom_metrics.rb +6 -4
- data/lib/solarwinds_apm/api/opentelemetry.rb +10 -6
- data/lib/solarwinds_apm/api/tracing.rb +7 -5
- data/lib/solarwinds_apm/api/transaction_name.rb +21 -11
- data/lib/solarwinds_apm/api.rb +8 -6
- data/lib/solarwinds_apm/config.rb +72 -47
- data/lib/solarwinds_apm/constants.rb +26 -26
- data/lib/solarwinds_apm/logger.rb +2 -0
- data/lib/solarwinds_apm/noop/README.md +1 -1
- data/lib/solarwinds_apm/noop/api.rb +85 -0
- data/lib/solarwinds_apm/noop/context.rb +15 -2
- data/lib/solarwinds_apm/noop/metadata.rb +7 -2
- data/lib/solarwinds_apm/{base.rb → noop/span.rb} +16 -15
- data/lib/solarwinds_apm/noop.rb +33 -0
- data/lib/solarwinds_apm/oboe_init_options.rb +50 -111
- data/lib/solarwinds_apm/opentelemetry/otlp_processor.rb +135 -0
- data/lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb +66 -41
- data/lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb +50 -52
- data/lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb +30 -22
- data/lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb +29 -16
- data/lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb +136 -99
- data/lib/solarwinds_apm/opentelemetry.rb +8 -5
- data/lib/solarwinds_apm/otel_config.rb +38 -43
- data/lib/solarwinds_apm/otel_lambda_config.rb +53 -0
- data/lib/solarwinds_apm/patch/dummy_patch.rb +12 -0
- data/lib/solarwinds_apm/{thread_local.rb → patch.rb} +6 -22
- data/lib/solarwinds_apm/support/logger_formatter.rb +4 -2
- data/lib/solarwinds_apm/support/logging_log_event.rb +2 -0
- data/lib/solarwinds_apm/support/lumberjack_formatter.rb +2 -0
- data/lib/solarwinds_apm/support/oboe_tracing_mode.rb +22 -22
- data/lib/solarwinds_apm/support/service_key_checker.rb +106 -0
- data/lib/solarwinds_apm/{support_report.rb → support/support_report.rb} +15 -10
- data/lib/solarwinds_apm/support/swomarginalia/comment.rb +18 -17
- data/lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb +13 -12
- data/lib/solarwinds_apm/support/swomarginalia/railtie.rb +4 -2
- data/lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb +3 -1
- data/lib/solarwinds_apm/support/transaction_cache.rb +6 -4
- data/lib/solarwinds_apm/support/transaction_settings.rb +7 -3
- data/lib/solarwinds_apm/support/txn_name_manager.rb +8 -3
- data/lib/solarwinds_apm/support/utils.rb +12 -9
- data/lib/solarwinds_apm/support/x_trace_options.rb +23 -17
- data/lib/solarwinds_apm/support.rb +28 -23
- data/lib/solarwinds_apm/version.rb +4 -2
- data/lib/solarwinds_apm.rb +82 -52
- metadata +23 -28
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
2
4
|
#
|
3
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
|
@@ -7,24 +9,25 @@
|
|
7
9
|
module SolarWindsAPM
|
8
10
|
# Utils
|
9
11
|
class Utils
|
10
|
-
VERSION = '00'
|
12
|
+
VERSION = '00'
|
11
13
|
|
12
14
|
def self.trace_state_header(trace_state)
|
13
|
-
return nil if trace_state.nil?
|
15
|
+
return nil if trace_state.nil? || trace_state.empty?
|
14
16
|
|
15
|
-
arr
|
16
|
-
|
17
|
-
|
18
|
-
SolarWindsAPM.logger.debug {"[#{name}/#{__method__}] generated trace_state_header: #{header}"}
|
17
|
+
arr = trace_state.to_h.map { |key, value| "#{key}=#{value}" }
|
18
|
+
header = arr.join(',')
|
19
|
+
SolarWindsAPM.logger.debug { "[#{name}/#{__method__}] generated trace_state_header: #{header}" }
|
19
20
|
header
|
20
21
|
end
|
21
22
|
|
22
23
|
# Generates a liboboe W3C compatible trace_context from provided OTel span context.
|
23
24
|
def self.traceparent_from_context(span_context)
|
24
|
-
flag = span_context.trace_flags.sampled
|
25
|
+
flag = span_context.trace_flags.sampled? ? 1 : 0
|
25
26
|
xtr = "#{VERSION}-#{span_context.hex_trace_id}-#{span_context.hex_span_id}-0#{flag}"
|
26
|
-
SolarWindsAPM.logger.debug
|
27
|
+
SolarWindsAPM.logger.debug do
|
28
|
+
"[#{name}/#{__method__}] generated traceparent: #{xtr} from #{span_context.inspect}"
|
29
|
+
end
|
27
30
|
xtr
|
28
31
|
end
|
29
32
|
end
|
30
|
-
end
|
33
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
2
4
|
#
|
3
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
|
@@ -7,9 +9,9 @@
|
|
7
9
|
module SolarWindsAPM
|
8
10
|
# XTraceOptions
|
9
11
|
class XTraceOptions
|
10
|
-
attr_reader :options, :signature, :trigger_trace, :timestamp,
|
12
|
+
attr_reader :options, :signature, :trigger_trace, :timestamp,
|
11
13
|
:sw_keys, :custom_kvs, :ignored
|
12
|
-
|
14
|
+
|
13
15
|
##
|
14
16
|
# use by Trigger Tracing
|
15
17
|
# TODO - refactor for w3c when ticket ready
|
@@ -36,10 +38,10 @@ module SolarWindsAPM
|
|
36
38
|
# - ts (unix timestamp)
|
37
39
|
# - other keys will be reported in the response options as ignored
|
38
40
|
|
39
|
-
SW_XTRACEOPTIONS_RESPONSE_KEY = 'xtrace_options_response'
|
41
|
+
SW_XTRACEOPTIONS_RESPONSE_KEY = 'xtrace_options_response'
|
40
42
|
|
41
43
|
def initialize(context)
|
42
|
-
SolarWindsAPM.logger.debug {"[#{self.class}/#{__method__}] x_trace_options context: #{context.inspect}"}
|
44
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] x_trace_options context: #{context.inspect}" }
|
43
45
|
@context = context.dup
|
44
46
|
@trigger_trace = false
|
45
47
|
@custom_kvs = {}
|
@@ -64,19 +66,19 @@ module SolarWindsAPM
|
|
64
66
|
end
|
65
67
|
when 'sw-keys'
|
66
68
|
if @sw_keys
|
67
|
-
SolarWindsAPM.logger.info {"[#{self.class}/#{__method__}] Duplicate key: #{k[0]}"}
|
69
|
+
SolarWindsAPM.logger.info { "[#{self.class}/#{__method__}] Duplicate key: #{k[0]}" }
|
68
70
|
else
|
69
71
|
@sw_keys = k[1].strip
|
70
72
|
end
|
71
73
|
when /^custom-[^\s]*$/
|
72
74
|
if @custom_kvs[k[0]]
|
73
|
-
SolarWindsAPM.logger.info {"[#{self.class}/#{__method__}] Duplicate key: #{k[0]}"}
|
75
|
+
SolarWindsAPM.logger.info { "[#{self.class}/#{__method__}] Duplicate key: #{k[0]}" }
|
74
76
|
else
|
75
77
|
@custom_kvs[k[0]] = k[1].strip
|
76
78
|
end
|
77
79
|
when 'ts'
|
78
|
-
if @timestamp
|
79
|
-
SolarWindsAPM.logger.info {"[#{self.class}/#{__method__}] Duplicate key: #{k[0]}"}
|
80
|
+
if @timestamp.positive?
|
81
|
+
SolarWindsAPM.logger.info { "[#{self.class}/#{__method__}] Duplicate key: #{k[0]}" }
|
80
82
|
else
|
81
83
|
@timestamp = k[1].to_i
|
82
84
|
end
|
@@ -84,13 +86,15 @@ module SolarWindsAPM
|
|
84
86
|
@ignored << k[0]
|
85
87
|
end
|
86
88
|
end
|
87
|
-
|
89
|
+
return if @ignored.empty?
|
90
|
+
|
91
|
+
SolarWindsAPM.logger.info("[#{self.class}/#{__method__}] Some keys were ignored: #{@ignored.join(',')}")
|
88
92
|
end
|
89
93
|
|
90
94
|
def add_kvs(kvs, settings)
|
91
95
|
return unless settings.auth_ok?
|
92
96
|
|
93
|
-
@custom_kvs.each { |k,v| kvs[k] = v } unless @custom_kvs.empty?
|
97
|
+
@custom_kvs.each { |k, v| kvs[k] = v } unless @custom_kvs.empty?
|
94
98
|
kvs['SWKeys'] = @sw_keys if @sw_keys
|
95
99
|
kvs['TriggeredTrace'] = true if settings.triggered_trace?
|
96
100
|
end
|
@@ -98,24 +102,26 @@ module SolarWindsAPM
|
|
98
102
|
def obtain_signature
|
99
103
|
# INTL_SWO_SIGNATURE_KEY = sw_signature
|
100
104
|
signature = obtain_sw_value(SolarWindsAPM::Constants::INTL_SWO_SIGNATURE_KEY)
|
101
|
-
SolarWindsAPM.logger.debug {"[#{self.class}/#{__method__}] x_trace_options option_signature: #{signature}"}
|
105
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] x_trace_options option_signature: #{signature}" }
|
102
106
|
signature
|
103
107
|
end
|
104
108
|
|
105
109
|
def options_header
|
106
|
-
# INTL_SWO_X_OPTIONS_KEY = sw_xtraceoptions
|
110
|
+
# INTL_SWO_X_OPTIONS_KEY = sw_xtraceoptions
|
107
111
|
header = obtain_sw_value(SolarWindsAPM::Constants::INTL_SWO_X_OPTIONS_KEY)
|
108
|
-
SolarWindsAPM.logger.debug {"[#{self.class}/#{__method__}] x_trace_options option_header: #{header}"}
|
112
|
+
SolarWindsAPM.logger.debug { "[#{self.class}/#{__method__}] x_trace_options option_header: #{header}" }
|
109
113
|
header
|
110
114
|
end
|
111
115
|
|
112
116
|
def obtain_sw_value(type)
|
113
117
|
sw_value = nil
|
114
|
-
instance_variable = @context&.instance_variable_get(
|
118
|
+
instance_variable = @context&.instance_variable_get('@entries')
|
115
119
|
instance_variable&.each do |key, value|
|
116
|
-
|
117
|
-
|
118
|
-
|
120
|
+
next unless key.instance_of?(::String)
|
121
|
+
|
122
|
+
sw_value = value if key == type
|
123
|
+
SolarWindsAPM.logger.debug do
|
124
|
+
"[#{self.class}/#{__method__}] obtained sw value: #{type} #{key}: #{value.inspect}"
|
119
125
|
end
|
120
126
|
end
|
121
127
|
sw_value
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
2
4
|
#
|
3
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,35 +8,38 @@
|
|
6
8
|
|
7
9
|
# This file is for loading support library
|
8
10
|
|
9
|
-
require_relative '
|
10
|
-
require_relative '
|
11
|
-
require_relative '
|
12
|
-
require_relative '
|
13
|
-
require_relative '
|
14
|
-
require_relative '
|
15
|
-
require_relative '
|
16
|
-
require_relative '
|
17
|
-
require_relative '
|
11
|
+
require_relative 'support/logger_formatter'
|
12
|
+
require_relative 'support/logging_log_event'
|
13
|
+
require_relative 'support/lumberjack_formatter'
|
14
|
+
require_relative 'support/transaction_cache'
|
15
|
+
require_relative 'support/transaction_settings'
|
16
|
+
require_relative 'support/oboe_tracing_mode'
|
17
|
+
require_relative 'support/txn_name_manager'
|
18
|
+
require_relative 'support/utils'
|
19
|
+
require_relative 'support/x_trace_options'
|
20
|
+
require_relative 'support/support_report'
|
18
21
|
|
19
22
|
if SolarWindsAPM::Config[:tag_sql]
|
20
|
-
if defined?(
|
21
|
-
if
|
22
|
-
require_relative '
|
23
|
-
elsif
|
23
|
+
if defined?(Rails)
|
24
|
+
if Rails.version < '7'
|
25
|
+
require_relative 'support/swomarginalia/railtie'
|
26
|
+
elsif Rails.version >= '7'
|
24
27
|
# User has to define in their config/environments:
|
25
|
-
# config.active_record.query_log_tags = [
|
26
|
-
# {
|
27
|
-
# tracecontext: -> {
|
28
|
-
# SolarWindsAPM::SWOMarginalia::Comment.traceparent
|
29
|
-
# }
|
28
|
+
# config.active_record.query_log_tags = [
|
29
|
+
# {
|
30
|
+
# tracecontext: -> {
|
31
|
+
# SolarWindsAPM::SWOMarginalia::Comment.traceparent
|
32
|
+
# }
|
30
33
|
# }
|
31
34
|
# ]
|
32
|
-
SolarWindsAPM.logger.info
|
33
|
-
|
34
|
-
|
35
|
+
SolarWindsAPM.logger.info do
|
36
|
+
'In Rails 7, tag tracecontext on a query by including SolarWindsAPM::SWOMarginalia::Comment.traceparent as function in config.active_record.query_log_tags.'
|
37
|
+
end
|
38
|
+
SolarWindsAPM.logger.info { 'For more information, please check https://api.rubyonrails.org/classes/ActiveRecord/QueryLogs.html' }
|
39
|
+
require_relative 'support/swomarginalia/comment'
|
35
40
|
end
|
36
|
-
elsif defined?(
|
37
|
-
require_relative '
|
41
|
+
elsif defined?(ActiveRecord)
|
42
|
+
require_relative 'support/swomarginalia/load_swomarginalia'
|
38
43
|
SolarWindsAPM::SWOMarginalia::LoadSWOMarginalia.insert
|
39
44
|
end
|
40
45
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
2
4
|
#
|
3
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
|
@@ -11,8 +13,8 @@ module SolarWindsAPM
|
|
11
13
|
module Version
|
12
14
|
MAJOR = 6 # breaking,
|
13
15
|
MINOR = 0 # feature,
|
14
|
-
PATCH =
|
15
|
-
PRE =
|
16
|
+
PATCH = 1 # fix => BFF
|
17
|
+
PRE = nil
|
16
18
|
|
17
19
|
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
18
20
|
end
|
data/lib/solarwinds_apm.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# © 2023 SolarWinds Worldwide, LLC. All rights reserved.
|
2
4
|
#
|
3
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
|
@@ -5,70 +7,98 @@
|
|
5
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.
|
6
8
|
|
7
9
|
begin
|
10
|
+
require 'solarwinds_apm/logger'
|
11
|
+
require 'solarwinds_apm/version'
|
12
|
+
require 'solarwinds_apm/noop'
|
13
|
+
require 'opentelemetry-api'
|
8
14
|
if ENV.fetch('SW_APM_ENABLED', 'true') == 'false'
|
9
|
-
SolarWindsAPM.logger.
|
15
|
+
SolarWindsAPM.logger.info '==================================================================='
|
16
|
+
SolarWindsAPM.logger.info 'SW_APM_ENABLED environment variable detected and was set to false. SolarWindsAPM disabled'
|
17
|
+
SolarWindsAPM.logger.info '==================================================================='
|
10
18
|
return
|
11
19
|
end
|
12
20
|
|
13
|
-
require 'solarwinds_apm/version'
|
14
|
-
require 'solarwinds_apm/thread_local'
|
15
|
-
require 'solarwinds_apm/support_report'
|
16
|
-
require 'solarwinds_apm/constants'
|
17
|
-
require 'solarwinds_apm/api'
|
18
|
-
require 'solarwinds_apm/base'
|
19
|
-
require 'solarwinds_apm/logger'
|
20
|
-
require 'solarwinds_apm/config'
|
21
|
-
|
22
|
-
SolarWindsAPM::Config.load_config_file
|
23
|
-
SolarWindsAPM.loaded = false
|
24
21
|
begin
|
25
|
-
if
|
26
|
-
|
27
|
-
require 'solarwinds_apm/oboe_init_options'
|
28
|
-
|
22
|
+
if RUBY_PLATFORM.include?('linux')
|
23
|
+
require 'solarwinds_apm/config'
|
24
|
+
require 'solarwinds_apm/oboe_init_options' # setup oboe reporter options
|
25
|
+
if !SolarWindsAPM::OboeInitOptions.instance.service_key_ok? && !SolarWindsAPM::OboeInitOptions.instance.lambda_env
|
26
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
27
|
+
SolarWindsAPM.logger.warn 'SW_APM_SERVICE_KEY Error. SolarWinds APM disabled'
|
28
|
+
SolarWindsAPM.logger.warn 'Please check previous log messages for more details.'
|
29
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
30
|
+
return
|
31
|
+
end
|
32
|
+
|
33
|
+
require_relative 'libsolarwinds_apm.so' # load c-lib oboe
|
34
|
+
require_relative 'oboe_metal' # initialize reporter: SolarWindsAPM.loaded = true
|
35
|
+
|
36
|
+
require 'opentelemetry/sdk/version' # load otel sdk version
|
37
|
+
require 'opentelemetry/instrumentation/all/version' # load otel instrumentation
|
38
|
+
|
39
|
+
SolarWindsAPM.logger.info '==================================================================='
|
40
|
+
SolarWindsAPM.logger.info "Ruby #{RUBY_VERSION} on platform #{RUBY_PLATFORM}."
|
41
|
+
SolarWindsAPM.logger.info "Current solarwinds_apm version: #{SolarWindsAPM::Version::STRING}."
|
42
|
+
SolarWindsAPM.logger.info "OpenTelemetry version: #{OpenTelemetry::SDK::VERSION}."
|
43
|
+
SolarWindsAPM.logger.info "OpenTelemetry instrumentation version: #{OpenTelemetry::Instrumentation::All::VERSION}."
|
44
|
+
SolarWindsAPM.logger.info '==================================================================='
|
45
|
+
|
46
|
+
if SolarWindsAPM::OboeInitOptions.instance.lambda_env
|
47
|
+
SolarWindsAPM.logger.info '==================================================================='
|
48
|
+
SolarWindsAPM.logger.info "Ruby #{RUBY_VERSION} on platform #{RUBY_PLATFORM} is running in lambda environment."
|
49
|
+
SolarWindsAPM.logger.info '==================================================================='
|
50
|
+
|
51
|
+
SolarWindsAPM.oboe_api = SolarWindsAPM::OboeAPI.new # start oboe api for lambda env
|
52
|
+
require 'solarwinds_apm/otel_lambda_config'
|
53
|
+
|
54
|
+
SolarWindsAPM::OTelLambdaConfig.initialize # we don't allow in-code configuration under lambda env
|
55
|
+
else
|
56
|
+
SolarWindsAPM::Reporter.start # start the reporter, any issue will be logged
|
57
|
+
|
58
|
+
if SolarWindsAPM.loaded
|
59
|
+
require 'solarwinds_apm/constants'
|
60
|
+
require 'solarwinds_apm/api'
|
61
|
+
require 'solarwinds_apm/support'
|
62
|
+
require 'solarwinds_apm/opentelemetry'
|
63
|
+
require 'solarwinds_apm/patch'
|
64
|
+
require 'solarwinds_apm/otel_config'
|
65
|
+
|
66
|
+
if ENV['SW_APM_AUTO_CONFIGURE'] != 'false'
|
67
|
+
SolarWindsAPM::OTelConfig.initialize
|
68
|
+
elsif ENV['SW_APM_AUTO_CONFIGURE'] == 'false'
|
69
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
70
|
+
SolarWindsAPM.logger.warn 'SW_APM_AUTO_CONFIGURE set to false.'
|
71
|
+
SolarWindsAPM.logger.warn 'You need to initialize Ruby library in application with'
|
72
|
+
SolarWindsAPM.logger.warn 'SolarWindsAPM::OTelConfig.initialize_with_config do |config|'
|
73
|
+
SolarWindsAPM.logger.warn ' # ... your configuration code'
|
74
|
+
SolarWindsAPM.logger.warn 'end'
|
75
|
+
SolarWindsAPM.logger.warn 'See: https://github.com/solarwinds/apm-ruby/blob/main/CONFIGURATION.md#in-code-configuration'
|
76
|
+
SolarWindsAPM.logger.warn "\e[1mPlease discard this message if application have already taken this action.\e[0m"
|
77
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
78
|
+
end
|
79
|
+
else
|
80
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
81
|
+
SolarWindsAPM.logger.warn 'SolarWindsAPM not loaded. SolarWinds APM disabled'
|
82
|
+
SolarWindsAPM.logger.warn 'Please check previous log messages.'
|
83
|
+
SolarWindsAPM.logger.warn '=============================================================='
|
84
|
+
end
|
85
|
+
end
|
29
86
|
else
|
30
87
|
SolarWindsAPM.logger.warn '==================================================================='
|
31
|
-
SolarWindsAPM.logger.warn "SolarWindsAPM warning: Platform #{RUBY_PLATFORM} not yet supported
|
88
|
+
SolarWindsAPM.logger.warn "SolarWindsAPM warning: Platform #{RUBY_PLATFORM} not yet supported on current solarwinds_apm #{SolarWindsAPM::Version::STRING}"
|
32
89
|
SolarWindsAPM.logger.warn 'see: https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent'
|
33
|
-
SolarWindsAPM.logger.warn '
|
90
|
+
SolarWindsAPM.logger.warn 'SolarWinds APM disabled.'
|
34
91
|
SolarWindsAPM.logger.warn 'Contact technicalsupport@solarwinds.com if this is unexpected.'
|
35
92
|
SolarWindsAPM.logger.warn '==================================================================='
|
36
93
|
end
|
37
94
|
rescue LoadError => e
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
SolarWindsAPM.logger.error '=============================================================='
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
if SolarWindsAPM.loaded
|
48
|
-
require 'solarwinds_apm/support'
|
49
|
-
require 'solarwinds_apm/opentelemetry'
|
50
|
-
require 'solarwinds_apm/otel_config'
|
51
|
-
if ENV['SW_APM_AUTO_CONFIGURE'] == 'false'
|
52
|
-
SolarWindsAPM.logger.warn "SolarWindsAPM warning: Ruby library is not initilaized.
|
53
|
-
You may need to initialize Ruby library in application like the following:
|
54
|
-
SolarWindsAPM::OTelConfig.initialize_with_config do |config|
|
55
|
-
...
|
56
|
-
end"
|
57
|
-
else
|
58
|
-
SolarWindsAPM::OTelConfig.initialize
|
59
|
-
end
|
60
|
-
|
61
|
-
SolarWindsAPM::Reporter.start
|
62
|
-
else
|
63
|
-
SolarWindsAPM.logger.warn '=============================================================='
|
64
|
-
SolarWindsAPM.logger.warn 'SolarWindsAPM not loaded. Tracing disabled.'
|
65
|
-
SolarWindsAPM.logger.warn 'There may be a problem with the service key or other settings.'
|
66
|
-
SolarWindsAPM.logger.warn 'Please check previous log messages.'
|
67
|
-
SolarWindsAPM.logger.warn '=============================================================='
|
68
|
-
require 'solarwinds_apm/noop/context'
|
69
|
-
require 'solarwinds_apm/noop/metadata'
|
95
|
+
SolarWindsAPM.logger.error '=============================================================='
|
96
|
+
SolarWindsAPM.logger.error 'Error occurs while loading solarwinds_apm. SolarWinds APM disabled.'
|
97
|
+
SolarWindsAPM.logger.error "Error: #{e.message}"
|
98
|
+
SolarWindsAPM.logger.error 'See: https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent'
|
99
|
+
SolarWindsAPM.logger.error '=============================================================='
|
70
100
|
end
|
71
101
|
rescue StandardError => e
|
72
|
-
|
73
|
-
|
102
|
+
warn "[solarwinds_apm/error] Problem loading: #{e.inspect}"
|
103
|
+
warn e.backtrace
|
74
104
|
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.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maia Engeli
|
@@ -11,36 +11,36 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: opentelemetry-
|
17
|
+
name: opentelemetry-instrumentation-all
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 0.31.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.31.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name: opentelemetry-
|
31
|
+
name: opentelemetry-sdk
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 1.2.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 1.2.0
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: json
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,20 +55,6 @@ dependencies:
|
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '2.0'
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: opentelemetry-exporter-otlp
|
60
|
-
requirement: !ruby/object:Gem::Requirement
|
61
|
-
requirements:
|
62
|
-
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 0.24.2
|
65
|
-
type: :development
|
66
|
-
prerelease: false
|
67
|
-
version_requirements: !ruby/object:Gem::Requirement
|
68
|
-
requirements:
|
69
|
-
- - ">="
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
version: 0.24.2
|
72
58
|
description: Automatic tracing and metrics for Ruby applications. Get started at cloud.solarwinds.com
|
73
59
|
email: technicalsupport@solarwinds.com
|
74
60
|
executables: []
|
@@ -82,6 +68,8 @@ files:
|
|
82
68
|
- ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256
|
83
69
|
- ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256
|
84
70
|
- ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256
|
71
|
+
- ext/oboe_metal/lib/liboboe-1.0-lambda-aarch64.so.sha256
|
72
|
+
- ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256
|
85
73
|
- ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256
|
86
74
|
- ext/oboe_metal/src/VERSION
|
87
75
|
- ext/oboe_metal/src/bson/bson.h
|
@@ -102,27 +90,35 @@ files:
|
|
102
90
|
- lib/solarwinds_apm/api/opentelemetry.rb
|
103
91
|
- lib/solarwinds_apm/api/tracing.rb
|
104
92
|
- lib/solarwinds_apm/api/transaction_name.rb
|
105
|
-
- lib/solarwinds_apm/base.rb
|
106
93
|
- lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt
|
107
94
|
- lib/solarwinds_apm/config.rb
|
108
95
|
- lib/solarwinds_apm/constants.rb
|
109
96
|
- lib/solarwinds_apm/logger.rb
|
97
|
+
- lib/solarwinds_apm/noop.rb
|
110
98
|
- lib/solarwinds_apm/noop/README.md
|
99
|
+
- lib/solarwinds_apm/noop/api.rb
|
111
100
|
- lib/solarwinds_apm/noop/context.rb
|
112
101
|
- lib/solarwinds_apm/noop/metadata.rb
|
102
|
+
- lib/solarwinds_apm/noop/span.rb
|
113
103
|
- lib/solarwinds_apm/oboe_init_options.rb
|
114
104
|
- lib/solarwinds_apm/opentelemetry.rb
|
105
|
+
- lib/solarwinds_apm/opentelemetry/otlp_processor.rb
|
115
106
|
- lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb
|
116
107
|
- lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb
|
117
108
|
- lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb
|
118
109
|
- lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb
|
119
110
|
- lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb
|
120
111
|
- lib/solarwinds_apm/otel_config.rb
|
112
|
+
- lib/solarwinds_apm/otel_lambda_config.rb
|
113
|
+
- lib/solarwinds_apm/patch.rb
|
114
|
+
- lib/solarwinds_apm/patch/dummy_patch.rb
|
121
115
|
- lib/solarwinds_apm/support.rb
|
122
116
|
- lib/solarwinds_apm/support/logger_formatter.rb
|
123
117
|
- lib/solarwinds_apm/support/logging_log_event.rb
|
124
118
|
- lib/solarwinds_apm/support/lumberjack_formatter.rb
|
125
119
|
- lib/solarwinds_apm/support/oboe_tracing_mode.rb
|
120
|
+
- lib/solarwinds_apm/support/service_key_checker.rb
|
121
|
+
- lib/solarwinds_apm/support/support_report.rb
|
126
122
|
- lib/solarwinds_apm/support/swomarginalia/LICENSE
|
127
123
|
- lib/solarwinds_apm/support/swomarginalia/README.md
|
128
124
|
- lib/solarwinds_apm/support/swomarginalia/comment.rb
|
@@ -134,8 +130,6 @@ files:
|
|
134
130
|
- lib/solarwinds_apm/support/txn_name_manager.rb
|
135
131
|
- lib/solarwinds_apm/support/utils.rb
|
136
132
|
- lib/solarwinds_apm/support/x_trace_options.rb
|
137
|
-
- lib/solarwinds_apm/support_report.rb
|
138
|
-
- lib/solarwinds_apm/thread_local.rb
|
139
133
|
- lib/solarwinds_apm/version.rb
|
140
134
|
homepage: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
141
135
|
licenses:
|
@@ -146,6 +140,7 @@ metadata:
|
|
146
140
|
homepage_uri: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
147
141
|
source_code_uri: https://github.com/solarwinds/apm-ruby
|
148
142
|
github_repo: https://github.com/solarwinds/apm-ruby.git
|
143
|
+
rubygems_mfa_required: 'true'
|
149
144
|
post_install_message:
|
150
145
|
rdoc_options: []
|
151
146
|
require_paths:
|
@@ -157,11 +152,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
152
|
version: 2.7.0
|
158
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
154
|
requirements:
|
160
|
-
- - "
|
155
|
+
- - ">="
|
161
156
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
157
|
+
version: '0'
|
163
158
|
requirements: []
|
164
|
-
rubygems_version: 3.3.
|
159
|
+
rubygems_version: 3.3.27
|
165
160
|
signing_key:
|
166
161
|
specification_version: 4
|
167
162
|
summary: SolarWindsAPM performance instrumentation gem for Ruby
|