solarwinds_apm 6.0.0 → 6.0.1
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/ext/oboe_metal/extconf.rb +42 -41
- 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 +30 -27
- 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 +8 -4
- data/lib/solarwinds_apm/api/tracing.rb +6 -4
- data/lib/solarwinds_apm/api/transaction_name.rb +21 -11
- data/lib/solarwinds_apm/api.rb +7 -5
- data/lib/solarwinds_apm/config.rb +70 -46
- data/lib/solarwinds_apm/constants.rb +25 -23
- data/lib/solarwinds_apm/logger.rb +2 -0
- data/lib/solarwinds_apm/noop/api.rb +3 -1
- data/lib/solarwinds_apm/noop/context.rb +2 -0
- data/lib/solarwinds_apm/noop/metadata.rb +2 -0
- data/lib/solarwinds_apm/noop/span.rb +2 -0
- data/lib/solarwinds_apm/noop.rb +8 -6
- data/lib/solarwinds_apm/oboe_init_options.rb +47 -39
- 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 +49 -51
- 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 +135 -98
- data/lib/solarwinds_apm/opentelemetry.rb +8 -5
- data/lib/solarwinds_apm/otel_config.rb +32 -25
- data/lib/solarwinds_apm/otel_lambda_config.rb +53 -0
- data/lib/solarwinds_apm/patch.rb +2 -0
- 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 +2 -0
- data/lib/solarwinds_apm/support/service_key_checker.rb +18 -6
- data/lib/solarwinds_apm/support/support_report.rb +5 -3
- 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 -24
- data/lib/solarwinds_apm/version.rb +3 -1
- data/lib/solarwinds_apm.rb +44 -34
- metadata +14 -23
@@ -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,36 +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 '
|
18
|
-
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'
|
19
21
|
|
20
22
|
if SolarWindsAPM::Config[:tag_sql]
|
21
|
-
if defined?(
|
22
|
-
if
|
23
|
-
require_relative '
|
24
|
-
elsif
|
23
|
+
if defined?(Rails)
|
24
|
+
if Rails.version < '7'
|
25
|
+
require_relative 'support/swomarginalia/railtie'
|
26
|
+
elsif Rails.version >= '7'
|
25
27
|
# User has to define in their config/environments:
|
26
|
-
# config.active_record.query_log_tags = [
|
27
|
-
# {
|
28
|
-
# tracecontext: -> {
|
29
|
-
# SolarWindsAPM::SWOMarginalia::Comment.traceparent
|
30
|
-
# }
|
28
|
+
# config.active_record.query_log_tags = [
|
29
|
+
# {
|
30
|
+
# tracecontext: -> {
|
31
|
+
# SolarWindsAPM::SWOMarginalia::Comment.traceparent
|
32
|
+
# }
|
31
33
|
# }
|
32
34
|
# ]
|
33
|
-
SolarWindsAPM.logger.info
|
34
|
-
|
35
|
-
|
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'
|
36
40
|
end
|
37
|
-
elsif defined?(
|
38
|
-
require_relative '
|
41
|
+
elsif defined?(ActiveRecord)
|
42
|
+
require_relative 'support/swomarginalia/load_swomarginalia'
|
39
43
|
SolarWindsAPM::SWOMarginalia::LoadSWOMarginalia.insert
|
40
44
|
end
|
41
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,7 +13,7 @@ module SolarWindsAPM
|
|
11
13
|
module Version
|
12
14
|
MAJOR = 6 # breaking,
|
13
15
|
MINOR = 0 # feature,
|
14
|
-
PATCH =
|
16
|
+
PATCH = 1 # fix => BFF
|
15
17
|
PRE = nil
|
16
18
|
|
17
19
|
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
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
|
@@ -17,12 +19,10 @@ begin
|
|
17
19
|
end
|
18
20
|
|
19
21
|
begin
|
20
|
-
if
|
22
|
+
if RUBY_PLATFORM.include?('linux')
|
21
23
|
require 'solarwinds_apm/config'
|
22
|
-
|
23
|
-
|
24
|
-
require 'solarwinds_apm/oboe_init_options' # setup oboe reporter options
|
25
|
-
unless SolarWindsAPM::OboeInitOptions.instance.service_key_ok?
|
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
26
|
SolarWindsAPM.logger.warn '=============================================================='
|
27
27
|
SolarWindsAPM.logger.warn 'SW_APM_SERVICE_KEY Error. SolarWinds APM disabled'
|
28
28
|
SolarWindsAPM.logger.warn 'Please check previous log messages for more details.'
|
@@ -30,8 +30,8 @@ begin
|
|
30
30
|
return
|
31
31
|
end
|
32
32
|
|
33
|
-
require_relative '
|
34
|
-
require_relative '
|
33
|
+
require_relative 'libsolarwinds_apm.so' # load c-lib oboe
|
34
|
+
require_relative 'oboe_metal' # initialize reporter: SolarWindsAPM.loaded = true
|
35
35
|
|
36
36
|
require 'opentelemetry/sdk/version' # load otel sdk version
|
37
37
|
require 'opentelemetry/instrumentation/all/version' # load otel instrumentation
|
@@ -43,34 +43,45 @@ begin
|
|
43
43
|
SolarWindsAPM.logger.info "OpenTelemetry instrumentation version: #{OpenTelemetry::Instrumentation::All::VERSION}."
|
44
44
|
SolarWindsAPM.logger.info '==================================================================='
|
45
45
|
|
46
|
-
SolarWindsAPM::
|
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
|
47
57
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
59
80
|
SolarWindsAPM.logger.warn '=============================================================='
|
60
|
-
SolarWindsAPM.logger.warn '
|
61
|
-
SolarWindsAPM.logger.warn '
|
62
|
-
SolarWindsAPM.logger.warn 'SolarWindsAPM::OTelConfig.initialize_with_config do |config|'
|
63
|
-
SolarWindsAPM.logger.warn ' # ... your configuration code'
|
64
|
-
SolarWindsAPM.logger.warn 'end'
|
65
|
-
SolarWindsAPM.logger.warn 'See: https://github.com/solarwinds/apm-ruby/blob/main/CONFIGURATION.md#in-code-configuration'
|
66
|
-
SolarWindsAPM.logger.warn "\e[1mPlease discard this message if application have already taken this action.\e[0m"
|
81
|
+
SolarWindsAPM.logger.warn 'SolarWindsAPM not loaded. SolarWinds APM disabled'
|
82
|
+
SolarWindsAPM.logger.warn 'Please check previous log messages.'
|
67
83
|
SolarWindsAPM.logger.warn '=============================================================='
|
68
84
|
end
|
69
|
-
else
|
70
|
-
SolarWindsAPM.logger.warn '=============================================================='
|
71
|
-
SolarWindsAPM.logger.warn 'SolarWindsAPM not loaded. SolarWinds APM disabled'
|
72
|
-
SolarWindsAPM.logger.warn 'Please check previous log messages.'
|
73
|
-
SolarWindsAPM.logger.warn '=============================================================='
|
74
85
|
end
|
75
86
|
else
|
76
87
|
SolarWindsAPM.logger.warn '==================================================================='
|
@@ -87,8 +98,7 @@ begin
|
|
87
98
|
SolarWindsAPM.logger.error 'See: https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent'
|
88
99
|
SolarWindsAPM.logger.error '=============================================================='
|
89
100
|
end
|
90
|
-
|
91
101
|
rescue StandardError => e
|
92
|
-
|
93
|
-
|
102
|
+
warn "[solarwinds_apm/error] Problem loading: #{e.inspect}"
|
103
|
+
warn e.backtrace
|
94
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
|
@@ -114,12 +102,14 @@ files:
|
|
114
102
|
- lib/solarwinds_apm/noop/span.rb
|
115
103
|
- lib/solarwinds_apm/oboe_init_options.rb
|
116
104
|
- lib/solarwinds_apm/opentelemetry.rb
|
105
|
+
- lib/solarwinds_apm/opentelemetry/otlp_processor.rb
|
117
106
|
- lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb
|
118
107
|
- lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb
|
119
108
|
- lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb
|
120
109
|
- lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb
|
121
110
|
- lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb
|
122
111
|
- lib/solarwinds_apm/otel_config.rb
|
112
|
+
- lib/solarwinds_apm/otel_lambda_config.rb
|
123
113
|
- lib/solarwinds_apm/patch.rb
|
124
114
|
- lib/solarwinds_apm/patch/dummy_patch.rb
|
125
115
|
- lib/solarwinds_apm/support.rb
|
@@ -150,6 +140,7 @@ metadata:
|
|
150
140
|
homepage_uri: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
|
151
141
|
source_code_uri: https://github.com/solarwinds/apm-ruby
|
152
142
|
github_repo: https://github.com/solarwinds/apm-ruby.git
|
143
|
+
rubygems_mfa_required: 'true'
|
153
144
|
post_install_message:
|
154
145
|
rdoc_options: []
|
155
146
|
require_paths:
|
@@ -165,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
156
|
- !ruby/object:Gem::Version
|
166
157
|
version: '0'
|
167
158
|
requirements: []
|
168
|
-
rubygems_version: 3.3.
|
159
|
+
rubygems_version: 3.3.27
|
169
160
|
signing_key:
|
170
161
|
specification_version: 4
|
171
162
|
summary: SolarWindsAPM performance instrumentation gem for Ruby
|