solarwinds_apm 5.0.0 → 5.1.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/build_and_release_gem.yml +23 -27
- data/.github/workflows/build_for_packagecloud.yml +7 -18
- data/.github/workflows/docker-images.yml +23 -17
- data/.github/workflows/run_cpluplus_tests.yml +1 -1
- data/.github/workflows/run_tests.yml +5 -6
- data/.github/workflows/scripts/test_install.rb +14 -9
- data/.github/workflows/test_on_4_linux.yml +3 -3
- data/.gitignore +5 -1
- data/.whitesource +22 -0
- data/CHANGELOG-appoptics.md +766 -0
- data/CHANGELOG.md +9 -753
- data/Gemfile +1 -0
- data/README.md +3 -3
- data/ext/oboe_metal/extconf.rb +5 -5
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -1
- data/ext/oboe_metal/src/README.md +1 -1
- data/ext/oboe_metal/src/VERSION +1 -1
- data/ext/oboe_metal/src/frames.h +1 -1
- data/ext/oboe_metal/src/init_solarwinds_apm.cc +4 -1
- data/ext/oboe_metal/src/logging.h +1 -1
- data/ext/oboe_metal/src/oboe.h +29 -45
- data/ext/oboe_metal/src/oboe_api.cpp +75 -26
- data/ext/oboe_metal/src/{oboe_api.hpp → oboe_api.h} +38 -7
- data/ext/oboe_metal/src/oboe_swig_wrap.cc +674 -84
- data/ext/oboe_metal/src/profiling.cc +1 -1
- data/ext/oboe_metal/src/profiling.h +1 -1
- data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +1 -21
- data/lib/solarwinds_apm/config.rb +9 -0
- data/lib/solarwinds_apm/inst/rack.rb +7 -1
- data/lib/solarwinds_apm/oboe_init_options.rb +12 -1
- data/lib/solarwinds_apm/support/profiling.rb +3 -0
- data/lib/solarwinds_apm/support.rb +1 -0
- data/lib/solarwinds_apm/version.rb +3 -4
- data/lib/solarwinds_apm.rb +1 -1
- data/solarwinds_apm.gemspec +6 -6
- metadata +13 -9
@@ -78,27 +78,6 @@ if defined?(SolarWindsAPM::Config)
|
|
78
78
|
#
|
79
79
|
SolarWindsAPM::Config[:verbose] = false
|
80
80
|
|
81
|
-
#
|
82
|
-
# Turn code profiling on or off
|
83
|
-
#
|
84
|
-
# By default profiling is set to :disabled, the other option is :enabled.
|
85
|
-
# :enabled means that any traced code will also be profiled to get deeper insight
|
86
|
-
# into the methods called during a trace.
|
87
|
-
# Profiling in the solarwinds_apm gem is based on the low-overhead, sampling
|
88
|
-
# profiler implemented in stackprof.
|
89
|
-
#
|
90
|
-
SolarWindsAPM::Config[:profiling] = :disabled
|
91
|
-
|
92
|
-
#
|
93
|
-
# Set the profiling interval (in milliseconds)
|
94
|
-
#
|
95
|
-
# The default is 10 milliseconds, which means that the method call stack is
|
96
|
-
# recorded every 10 milliseconds. Shorter intervals may give better insight,
|
97
|
-
# but will incur more overhead.
|
98
|
-
# Minimum: 1, Maximum: 100
|
99
|
-
#
|
100
|
-
SolarWindsAPM::Config[:profiling_interval] = 10
|
101
|
-
|
102
81
|
#
|
103
82
|
# Turn Tracing on or off
|
104
83
|
#
|
@@ -295,6 +274,7 @@ if defined?(SolarWindsAPM::Config)
|
|
295
274
|
#
|
296
275
|
SolarWindsAPM::Config[:ec2_metadata_timeout] = 1000
|
297
276
|
|
277
|
+
|
298
278
|
#############################################
|
299
279
|
## SETTINGS FOR INDIVIDUAL GEMS/FRAMEWORKS ##
|
300
280
|
#############################################
|
@@ -146,6 +146,9 @@ module SolarWindsAPM
|
|
146
146
|
(@@instrumentation+@@ignore).each { |k| @@config[k] = {} }
|
147
147
|
@@config[:transaction_name] = {}
|
148
148
|
|
149
|
+
@@config[:profiling] = :disabled
|
150
|
+
@@config[:profiling_interval] = 5
|
151
|
+
|
149
152
|
# Always load the template, it has all the keys and defaults defined,
|
150
153
|
# no guarantee of completeness in the user's config file
|
151
154
|
load(File.join(File.dirname(File.dirname(__FILE__)),
|
@@ -226,7 +229,12 @@ module SolarWindsAPM
|
|
226
229
|
Regexp.new(SolarWindsAPM::Config[:dnt_regexp], SolarWindsAPM::Config[:dnt_opts] || nil)
|
227
230
|
end
|
228
231
|
|
232
|
+
elsif key == :profiling
|
233
|
+
SolarWindsAPM.logger.warn "[solarwinds_apm/config] Profiling feature is currently not available."
|
234
|
+
@@config[:profiling] = :disabled
|
235
|
+
|
229
236
|
elsif key == :profiling_interval
|
237
|
+
SolarWindsAPM.logger.warn "[solarwinds_apm/config] Profiling feature is currently not available. :profiling_interval setting is not configured."
|
230
238
|
if value.is_a?(Integer) && value > 0
|
231
239
|
value = [100, value].min
|
232
240
|
else
|
@@ -271,6 +279,7 @@ module SolarWindsAPM
|
|
271
279
|
elsif key == :trigger_tracing_mode
|
272
280
|
# Make sure that the mode is stored as a symbol
|
273
281
|
@@config[key.to_sym] = value.to_sym
|
282
|
+
|
274
283
|
end
|
275
284
|
end
|
276
285
|
# rubocop:enable Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
@@ -63,7 +63,13 @@ if SolarWindsAPM.loaded
|
|
63
63
|
response =
|
64
64
|
propagate_tracecontext(env, settings) do
|
65
65
|
sample(env, settings, options, profile_spans) do
|
66
|
-
SolarWindsAPM::Profiling
|
66
|
+
if defined?(SolarWindsAPM::Profiling)
|
67
|
+
SolarWindsAPM::Profiling.run do
|
68
|
+
SolarWindsAPM::TransactionMetrics.metrics(env, settings) do
|
69
|
+
@app.call(env)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
else
|
67
73
|
SolarWindsAPM::TransactionMetrics.metrics(env, settings) do
|
68
74
|
@app.call(env)
|
69
75
|
end
|
@@ -53,6 +53,8 @@ module SolarWindsAPM
|
|
53
53
|
# hardcoded arg for lambda (lambda not supported yet)
|
54
54
|
# hardcoded arg for grpc hack
|
55
55
|
# hardcoded arg for trace id format to use w3c format
|
56
|
+
# flag for format of metric (0 = Both; 1 = AppOptics only; 2 = SWO only; default = 0)
|
57
|
+
@metric_format = determine_the_metric_model
|
56
58
|
end
|
57
59
|
|
58
60
|
def re_init # for testing with changed ENV vars
|
@@ -83,7 +85,8 @@ module SolarWindsAPM
|
|
83
85
|
@grpc_proxy, #18
|
84
86
|
0, #19 arg for lambda (no lambda for ruby yet)
|
85
87
|
1, #20 arg for grpc hack, hardcoded to include hack
|
86
|
-
1
|
88
|
+
1, #21 arg for trace id format to use w3c format
|
89
|
+
@metric_format #22
|
87
90
|
]
|
88
91
|
end
|
89
92
|
|
@@ -186,6 +189,14 @@ module SolarWindsAPM
|
|
186
189
|
|
187
190
|
proxy
|
188
191
|
end
|
192
|
+
|
193
|
+
def determine_the_metric_model
|
194
|
+
if ENV['SW_APM_COLLECTOR']&.include? "appoptics.com"
|
195
|
+
return 1
|
196
|
+
else
|
197
|
+
return 0
|
198
|
+
end
|
199
|
+
end
|
189
200
|
end
|
190
201
|
end
|
191
202
|
|
@@ -7,10 +7,9 @@ module SolarWindsAPM
|
|
7
7
|
# solarwinds_apm.gemspec during gem build process
|
8
8
|
module Version
|
9
9
|
MAJOR = 5 # breaking,
|
10
|
-
MINOR =
|
11
|
-
PATCH =
|
12
|
-
PRE =
|
13
|
-
# set to nil for production releases into rubygems
|
10
|
+
MINOR = 1 # feature,
|
11
|
+
PATCH = 1 # fix => BFF
|
12
|
+
PRE = "pre" # for pre-releases into packagecloud, set to nil for production releases into rubygems
|
14
13
|
|
15
14
|
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
16
15
|
end
|
data/lib/solarwinds_apm.rb
CHANGED
@@ -57,7 +57,7 @@ begin
|
|
57
57
|
SolarWindsAPM.logger.warn '=============================================================='
|
58
58
|
require 'solarwinds_apm/noop/context'
|
59
59
|
require 'solarwinds_apm/noop/metadata'
|
60
|
-
require 'solarwinds_apm/noop/profiling'
|
60
|
+
# require 'solarwinds_apm/noop/profiling'
|
61
61
|
require 'solarwinds_apm/support/trace_string'
|
62
62
|
end
|
63
63
|
|
data/solarwinds_apm.gemspec
CHANGED
@@ -8,26 +8,26 @@ Gem::Specification.new do |s|
|
|
8
8
|
|
9
9
|
s.license = "Apache-2.0"
|
10
10
|
|
11
|
-
s.authors = ["Maia Engeli", "Peter Giacomo Lombardo", "Spiros Eliopoulos"]
|
11
|
+
s.authors = ["Maia Engeli", "Peter Giacomo Lombardo", "Spiros Eliopoulos", "Xuan Cao"]
|
12
12
|
s.email = %q{technicalsupport@solarwinds.com}
|
13
|
-
s.homepage = %q{https://
|
13
|
+
s.homepage = %q{https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html}
|
14
14
|
s.summary = %q{SolarWindsAPM performance instrumentation gem for Ruby}
|
15
15
|
s.description = <<-EOF
|
16
16
|
Automatic tracing and metrics for Ruby applications. Get started at cloud.solarwinds.com
|
17
17
|
EOF
|
18
18
|
|
19
19
|
s.metadata = {
|
20
|
-
'changelog_uri' => 'https://github.com/
|
20
|
+
'changelog_uri' => 'https://github.com/solarwindscloud/solarwinds-apm-ruby/releases',
|
21
21
|
'documentation_uri' => 'https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent',
|
22
|
-
'homepage_uri' => 'https://
|
23
|
-
'source_code_uri' => 'https://github.com/
|
22
|
+
'homepage_uri' => 'https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html',
|
23
|
+
'source_code_uri' => 'https://github.com/solarwindscloud/solarwinds-apm-ruby',
|
24
24
|
}
|
25
25
|
|
26
26
|
s.extra_rdoc_files = ['LICENSE']
|
27
27
|
s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|gemfiles)/}) }
|
28
28
|
s.files += ['ext/oboe_metal/src/oboe.h',
|
29
29
|
'ext/oboe_metal/src/oboe_api.cpp',
|
30
|
-
'ext/oboe_metal/src/oboe_api.
|
30
|
+
'ext/oboe_metal/src/oboe_api.h',
|
31
31
|
'ext/oboe_metal/src/oboe_debug.h',
|
32
32
|
'ext/oboe_metal/src/oboe_swig_wrap.cc',
|
33
33
|
'ext/oboe_metal/src/bson/bson.h',
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solarwinds_apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maia Engeli
|
8
8
|
- Peter Giacomo Lombardo
|
9
9
|
- Spiros Eliopoulos
|
10
|
+
- Xuan Cao
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2022-
|
14
|
+
date: 2022-10-08 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: json
|
@@ -59,6 +60,7 @@ extra_rdoc_files:
|
|
59
60
|
- LICENSE
|
60
61
|
files:
|
61
62
|
- ".dockerignore"
|
63
|
+
- ".github/CODEOWNERS"
|
62
64
|
- ".github/ISSUE_TEMPLATE/bug-or-feature-request.md"
|
63
65
|
- ".github/workflows/build_and_release_gem.yml"
|
64
66
|
- ".github/workflows/build_for_packagecloud.yml"
|
@@ -70,7 +72,9 @@ files:
|
|
70
72
|
- ".github/workflows/test_on_4_linux.yml"
|
71
73
|
- ".gitignore"
|
72
74
|
- ".rubocop.yml"
|
75
|
+
- ".whitesource"
|
73
76
|
- ".yardopts"
|
77
|
+
- CHANGELOG-appoptics.md
|
74
78
|
- CHANGELOG.md
|
75
79
|
- CONFIG.md
|
76
80
|
- Gemfile
|
@@ -97,7 +101,7 @@ files:
|
|
97
101
|
- ext/oboe_metal/src/logging.h
|
98
102
|
- ext/oboe_metal/src/oboe.h
|
99
103
|
- ext/oboe_metal/src/oboe_api.cpp
|
100
|
-
- ext/oboe_metal/src/oboe_api.
|
104
|
+
- ext/oboe_metal/src/oboe_api.h
|
101
105
|
- ext/oboe_metal/src/oboe_debug.h
|
102
106
|
- ext/oboe_metal/src/oboe_swig_wrap.cc
|
103
107
|
- ext/oboe_metal/src/profiling.cc
|
@@ -198,14 +202,14 @@ files:
|
|
198
202
|
- log/postgresql/.keep
|
199
203
|
- solarwinds_apm.gemspec
|
200
204
|
- yardoc_frontpage.md
|
201
|
-
homepage: https://
|
205
|
+
homepage: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
202
206
|
licenses:
|
203
207
|
- Apache-2.0
|
204
208
|
metadata:
|
205
|
-
changelog_uri: https://github.com/
|
209
|
+
changelog_uri: https://github.com/solarwindscloud/solarwinds-apm-ruby/releases
|
206
210
|
documentation_uri: https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent
|
207
|
-
homepage_uri: https://
|
208
|
-
source_code_uri: https://github.com/
|
211
|
+
homepage_uri: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
212
|
+
source_code_uri: https://github.com/solarwindscloud/solarwinds-apm-ruby
|
209
213
|
post_install_message:
|
210
214
|
rdoc_options: []
|
211
215
|
require_paths:
|
@@ -217,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
221
|
version: 2.5.0
|
218
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
223
|
requirements:
|
220
|
-
- - "
|
224
|
+
- - ">"
|
221
225
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
226
|
+
version: 1.3.1
|
223
227
|
requirements: []
|
224
228
|
rubygems_version: 3.1.6
|
225
229
|
signing_key:
|