solarwinds_apm 6.1.1 → 7.0.0.prev1

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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +53 -4
  3. data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +0 -4
  4. data/lib/solarwinds_apm/api/current_trace_info.rb +10 -6
  5. data/lib/solarwinds_apm/api/custom_instrumentation.rb +80 -0
  6. data/lib/solarwinds_apm/api/custom_metrics.rb +8 -25
  7. data/lib/solarwinds_apm/api/tracing.rb +12 -27
  8. data/lib/solarwinds_apm/api/transaction_name.rb +6 -10
  9. data/lib/solarwinds_apm/api.rb +2 -0
  10. data/lib/solarwinds_apm/config.rb +1 -1
  11. data/lib/solarwinds_apm/constants.rb +1 -0
  12. data/lib/solarwinds_apm/noop/api.rb +5 -2
  13. data/lib/solarwinds_apm/noop.rb +0 -24
  14. data/lib/solarwinds_apm/opentelemetry/otlp_processor.rb +90 -69
  15. data/lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb +0 -2
  16. data/lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb +5 -4
  17. data/lib/solarwinds_apm/opentelemetry.rb +5 -7
  18. data/lib/solarwinds_apm/otel_native_config.rb +177 -0
  19. data/lib/solarwinds_apm/patch/README.md +15 -0
  20. data/lib/solarwinds_apm/patch/tag_sql/sw_dbo_utils.rb +35 -0
  21. data/lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb +1 -12
  22. data/lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb +39 -0
  23. data/lib/solarwinds_apm/patch/tag_sql_patch.rb +2 -0
  24. data/lib/solarwinds_apm/{noop/metadata.rb → sampling/dice.rb} +19 -17
  25. data/lib/solarwinds_apm/sampling/http_sampler.rb +87 -0
  26. data/lib/solarwinds_apm/sampling/json_sampler.rb +52 -0
  27. data/lib/solarwinds_apm/sampling/metrics.rb +38 -0
  28. data/lib/solarwinds_apm/sampling/oboe_sampler.rb +348 -0
  29. data/lib/solarwinds_apm/sampling/sampler.rb +197 -0
  30. data/lib/solarwinds_apm/sampling/sampling_constants.rb +127 -0
  31. data/lib/solarwinds_apm/sampling/sampling_patch.rb +49 -0
  32. data/lib/solarwinds_apm/sampling/setting_example.txt +1 -0
  33. data/lib/solarwinds_apm/{noop/context.rb → sampling/settings.rb} +14 -25
  34. data/lib/solarwinds_apm/sampling/token_bucket.rb +126 -0
  35. data/lib/solarwinds_apm/sampling/trace_options.rb +100 -0
  36. data/lib/solarwinds_apm/{patch.rb → sampling.rb} +20 -4
  37. data/lib/solarwinds_apm/{noop/span.rb → support/aws_resource_detector.rb} +5 -18
  38. data/lib/solarwinds_apm/support/logger_formatter.rb +1 -1
  39. data/lib/solarwinds_apm/support/logging_log_event.rb +1 -1
  40. data/lib/solarwinds_apm/support/lumberjack_formatter.rb +1 -1
  41. data/lib/solarwinds_apm/support/otlp_endpoint.rb +99 -0
  42. data/lib/solarwinds_apm/support/resource_detector/aws/beanstalk.rb +51 -0
  43. data/lib/solarwinds_apm/support/resource_detector/aws/ec2.rb +145 -0
  44. data/lib/solarwinds_apm/support/resource_detector/aws/ecs.rb +173 -0
  45. data/lib/solarwinds_apm/support/resource_detector/aws/eks.rb +174 -0
  46. data/lib/solarwinds_apm/support/resource_detector/aws/lambda.rb +66 -0
  47. data/lib/solarwinds_apm/support/resource_detector.rb +192 -0
  48. data/lib/solarwinds_apm/support/service_key_checker.rb +12 -6
  49. data/lib/solarwinds_apm/support/transaction_settings.rb +6 -0
  50. data/lib/solarwinds_apm/support/txn_name_manager.rb +54 -9
  51. data/lib/solarwinds_apm/support/utils.rb +9 -0
  52. data/lib/solarwinds_apm/support.rb +3 -4
  53. data/lib/solarwinds_apm/version.rb +4 -4
  54. data/lib/solarwinds_apm.rb +27 -73
  55. metadata +105 -50
  56. data/ext/oboe_metal/extconf.rb +0 -168
  57. data/ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256 +0 -1
  58. data/ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256 +0 -1
  59. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256 +0 -1
  60. data/ext/oboe_metal/lib/liboboe-1.0-lambda-aarch64.so.sha256 +0 -1
  61. data/ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256 +0 -1
  62. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256 +0 -1
  63. data/ext/oboe_metal/src/VERSION +0 -1
  64. data/ext/oboe_metal/src/bson/bson.h +0 -220
  65. data/ext/oboe_metal/src/bson/platform_hacks.h +0 -91
  66. data/ext/oboe_metal/src/init_solarwinds_apm.cc +0 -18
  67. data/ext/oboe_metal/src/oboe.h +0 -930
  68. data/ext/oboe_metal/src/oboe_api.cpp +0 -793
  69. data/ext/oboe_metal/src/oboe_api.h +0 -621
  70. data/ext/oboe_metal/src/oboe_debug.h +0 -17
  71. data/ext/oboe_metal/src/oboe_swig_wrap.cc +0 -10954
  72. data/lib/oboe_metal.rb +0 -187
  73. data/lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt +0 -24
  74. data/lib/solarwinds_apm/oboe_init_options.rb +0 -222
  75. data/lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb +0 -239
  76. data/lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb +0 -174
  77. data/lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb +0 -333
  78. data/lib/solarwinds_apm/otel_config.rb +0 -174
  79. data/lib/solarwinds_apm/otel_lambda_config.rb +0 -56
  80. data/lib/solarwinds_apm/patch/dummy_patch.rb +0 -12
  81. data/lib/solarwinds_apm/support/oboe_tracing_mode.rb +0 -33
  82. data/lib/solarwinds_apm/support/support_report.rb +0 -99
  83. data/lib/solarwinds_apm/support/swomarginalia/LICENSE +0 -20
  84. data/lib/solarwinds_apm/support/swomarginalia/README.md +0 -46
  85. data/lib/solarwinds_apm/support/swomarginalia/comment.rb +0 -206
  86. data/lib/solarwinds_apm/support/swomarginalia/formatter.rb +0 -20
  87. data/lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb +0 -55
  88. data/lib/solarwinds_apm/support/swomarginalia/railtie.rb +0 -24
  89. data/lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb +0 -89
  90. data/lib/solarwinds_apm/support/transaction_cache.rb +0 -57
  91. data/lib/solarwinds_apm/support/x_trace_options.rb +0 -138
@@ -9,94 +9,48 @@
9
9
  begin
10
10
  require 'solarwinds_apm/logger'
11
11
  require 'solarwinds_apm/version'
12
- require 'solarwinds_apm/noop'
12
+ require 'solarwinds_apm/constants'
13
13
  require 'opentelemetry-api'
14
14
  if ENV.fetch('SW_APM_ENABLED', 'true') == 'false'
15
15
  SolarWindsAPM.logger.info '==================================================================='
16
16
  SolarWindsAPM.logger.info 'SW_APM_ENABLED environment variable detected and was set to false. SolarWindsAPM disabled'
17
17
  SolarWindsAPM.logger.info '==================================================================='
18
+ require 'solarwinds_apm/noop'
18
19
  return
19
20
  end
20
21
 
21
22
  begin
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 '==================================================================='
23
+ require 'solarwinds_apm/config'
24
+ require 'solarwinds_apm/otel_native_config'
45
25
 
46
- if SolarWindsAPM::OboeInitOptions.instance.lambda_env
26
+ if ENV['SW_APM_AUTO_CONFIGURE'] != 'false'
27
+ SolarWindsAPM::OTelNativeConfig.initialize
28
+ if SolarWindsAPM::OTelNativeConfig.agent_enabled
47
29
  SolarWindsAPM.logger.info '==================================================================='
48
- SolarWindsAPM.logger.info "Ruby #{RUBY_VERSION} on platform #{RUBY_PLATFORM} is running in lambda environment."
30
+ SolarWindsAPM.logger.info "Ruby #{RUBY_VERSION} on platform #{RUBY_PLATFORM}."
31
+ SolarWindsAPM.logger.info "Current solarwinds_apm version: #{SolarWindsAPM::Version::STRING}."
32
+ SolarWindsAPM.logger.info "OpenTelemetry version: #{OpenTelemetry::SDK::VERSION}."
33
+ SolarWindsAPM.logger.info "OpenTelemetry instrumentation version: #{OpenTelemetry::Instrumentation::All::VERSION}."
49
34
  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
35
  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
36
+ SolarWindsAPM.logger.warn '=============================================================='
37
+ SolarWindsAPM.logger.warn 'SolarWindsAPM not loaded. SolarWinds APM disabled'
38
+ SolarWindsAPM.logger.warn 'Please check previous log messages.'
39
+ SolarWindsAPM.logger.warn '=============================================================='
40
+ require 'solarwinds_apm/noop'
85
41
  end
86
- else
87
- SolarWindsAPM.logger.warn '==================================================================='
88
- SolarWindsAPM.logger.warn "SolarWindsAPM warning: Platform #{RUBY_PLATFORM} not yet supported on current solarwinds_apm #{SolarWindsAPM::Version::STRING}"
89
- SolarWindsAPM.logger.warn 'see: https://documentation.solarwinds.com/en/success_center/observability/default.htm#cshid=config-ruby-agent'
90
- SolarWindsAPM.logger.warn 'SolarWinds APM disabled.'
91
- SolarWindsAPM.logger.warn 'Contact technicalsupport@solarwinds.com if this is unexpected.'
92
- SolarWindsAPM.logger.warn '==================================================================='
42
+ elsif ENV['SW_APM_AUTO_CONFIGURE'] == 'false'
43
+ SolarWindsAPM.logger.warn '=============================================================='
44
+ SolarWindsAPM.logger.warn 'SW_APM_AUTO_CONFIGURE set to false.'
45
+ SolarWindsAPM.logger.warn 'You need to initialize Ruby library in application with'
46
+ SolarWindsAPM.logger.warn 'SolarWindsAPM::OTelNativeConfig.initialize_with_config do |config|'
47
+ SolarWindsAPM.logger.warn ' # ... your configuration code'
48
+ SolarWindsAPM.logger.warn 'end'
49
+ SolarWindsAPM.logger.warn 'See: https://github.com/solarwinds/apm-ruby/blob/main/CONFIGURATION.md#in-code-configuration'
50
+ SolarWindsAPM.logger.warn "\e[1mPlease discard this message if application have already taken this action.\e[0m"
51
+ SolarWindsAPM.logger.warn '=============================================================='
52
+ require 'solarwinds_apm/noop'
93
53
  end
94
- rescue LoadError => e
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 '=============================================================='
100
54
  end
101
55
  rescue StandardError => e
102
56
  warn "[solarwinds_apm/error] Problem loading: #{e.inspect}"
metadata CHANGED
@@ -1,18 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solarwinds_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 7.0.0.prev1
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: 2024-12-09 00:00:00.000000000 Z
14
+ date: 2025-06-10 00:00:00.000000000 Z
15
15
  dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: opentelemetry-exporter-otlp
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.29.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.29.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: opentelemetry-exporter-otlp-metrics
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.3.0
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.3.0
16
44
  - !ruby/object:Gem::Dependency
17
45
  name: opentelemetry-instrumentation-all
18
46
  requirement: !ruby/object:Gem::Requirement
@@ -27,6 +55,48 @@ dependencies:
27
55
  - - ">="
28
56
  - !ruby/object:Gem::Version
29
57
  version: 0.31.0
58
+ - !ruby/object:Gem::Dependency
59
+ name: opentelemetry-metrics-sdk
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.2.0
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 0.2.0
72
+ - !ruby/object:Gem::Dependency
73
+ name: opentelemetry-resource-detector-azure
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 0.1.0
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: 0.1.0
86
+ - !ruby/object:Gem::Dependency
87
+ name: opentelemetry-resource-detector-container
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.1.0
93
+ type: :runtime
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 0.1.0
30
100
  - !ruby/object:Gem::Dependency
31
101
  name: opentelemetry-sdk
32
102
  requirement: !ruby/object:Gem::Requirement
@@ -44,83 +114,68 @@ dependencies:
44
114
  description: Automatic tracing and metrics for Ruby applications. Get started at cloud.solarwinds.com
45
115
  email: technicalsupport@solarwinds.com
46
116
  executables: []
47
- extensions:
48
- - ext/oboe_metal/extconf.rb
117
+ extensions: []
49
118
  extra_rdoc_files:
50
119
  - LICENSE
51
120
  files:
52
121
  - ".yardopts"
53
122
  - LICENSE
54
123
  - README.md
55
- - ext/oboe_metal/extconf.rb
56
- - ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256
57
- - ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256
58
- - ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256
59
- - ext/oboe_metal/lib/liboboe-1.0-lambda-aarch64.so.sha256
60
- - ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256
61
- - ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256
62
- - ext/oboe_metal/src/VERSION
63
- - ext/oboe_metal/src/bson/bson.h
64
- - ext/oboe_metal/src/bson/platform_hacks.h
65
- - ext/oboe_metal/src/init_solarwinds_apm.cc
66
- - ext/oboe_metal/src/oboe.h
67
- - ext/oboe_metal/src/oboe_api.cpp
68
- - ext/oboe_metal/src/oboe_api.h
69
- - ext/oboe_metal/src/oboe_debug.h
70
- - ext/oboe_metal/src/oboe_swig_wrap.cc
71
- - lib/oboe_metal.rb
72
124
  - lib/rails/generators/solarwinds_apm/install_generator.rb
73
125
  - lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb
74
126
  - lib/solarwinds_apm.rb
75
127
  - lib/solarwinds_apm/api.rb
76
128
  - lib/solarwinds_apm/api/current_trace_info.rb
129
+ - lib/solarwinds_apm/api/custom_instrumentation.rb
77
130
  - lib/solarwinds_apm/api/custom_metrics.rb
78
131
  - lib/solarwinds_apm/api/opentelemetry.rb
79
132
  - lib/solarwinds_apm/api/tracing.rb
80
133
  - lib/solarwinds_apm/api/transaction_name.rb
81
- - lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt
82
134
  - lib/solarwinds_apm/config.rb
83
135
  - lib/solarwinds_apm/constants.rb
84
136
  - lib/solarwinds_apm/logger.rb
85
137
  - lib/solarwinds_apm/noop.rb
86
138
  - lib/solarwinds_apm/noop/README.md
87
139
  - lib/solarwinds_apm/noop/api.rb
88
- - lib/solarwinds_apm/noop/context.rb
89
- - lib/solarwinds_apm/noop/metadata.rb
90
- - lib/solarwinds_apm/noop/span.rb
91
- - lib/solarwinds_apm/oboe_init_options.rb
92
140
  - lib/solarwinds_apm/opentelemetry.rb
93
141
  - lib/solarwinds_apm/opentelemetry/otlp_processor.rb
94
- - lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb
95
- - lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb
96
142
  - lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb
97
143
  - lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb
98
- - lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb
99
- - lib/solarwinds_apm/otel_config.rb
100
- - lib/solarwinds_apm/otel_lambda_config.rb
101
- - lib/solarwinds_apm/patch.rb
102
- - lib/solarwinds_apm/patch/dummy_patch.rb
144
+ - lib/solarwinds_apm/otel_native_config.rb
145
+ - lib/solarwinds_apm/patch/README.md
146
+ - lib/solarwinds_apm/patch/tag_sql/sw_dbo_utils.rb
103
147
  - lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb
148
+ - lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb
104
149
  - lib/solarwinds_apm/patch/tag_sql_patch.rb
150
+ - lib/solarwinds_apm/sampling.rb
151
+ - lib/solarwinds_apm/sampling/dice.rb
152
+ - lib/solarwinds_apm/sampling/http_sampler.rb
153
+ - lib/solarwinds_apm/sampling/json_sampler.rb
154
+ - lib/solarwinds_apm/sampling/metrics.rb
155
+ - lib/solarwinds_apm/sampling/oboe_sampler.rb
156
+ - lib/solarwinds_apm/sampling/sampler.rb
157
+ - lib/solarwinds_apm/sampling/sampling_constants.rb
158
+ - lib/solarwinds_apm/sampling/sampling_patch.rb
159
+ - lib/solarwinds_apm/sampling/setting_example.txt
160
+ - lib/solarwinds_apm/sampling/settings.rb
161
+ - lib/solarwinds_apm/sampling/token_bucket.rb
162
+ - lib/solarwinds_apm/sampling/trace_options.rb
105
163
  - lib/solarwinds_apm/support.rb
164
+ - lib/solarwinds_apm/support/aws_resource_detector.rb
106
165
  - lib/solarwinds_apm/support/logger_formatter.rb
107
166
  - lib/solarwinds_apm/support/logging_log_event.rb
108
167
  - lib/solarwinds_apm/support/lumberjack_formatter.rb
109
- - lib/solarwinds_apm/support/oboe_tracing_mode.rb
168
+ - lib/solarwinds_apm/support/otlp_endpoint.rb
169
+ - lib/solarwinds_apm/support/resource_detector.rb
170
+ - lib/solarwinds_apm/support/resource_detector/aws/beanstalk.rb
171
+ - lib/solarwinds_apm/support/resource_detector/aws/ec2.rb
172
+ - lib/solarwinds_apm/support/resource_detector/aws/ecs.rb
173
+ - lib/solarwinds_apm/support/resource_detector/aws/eks.rb
174
+ - lib/solarwinds_apm/support/resource_detector/aws/lambda.rb
110
175
  - lib/solarwinds_apm/support/service_key_checker.rb
111
- - lib/solarwinds_apm/support/support_report.rb
112
- - lib/solarwinds_apm/support/swomarginalia/LICENSE
113
- - lib/solarwinds_apm/support/swomarginalia/README.md
114
- - lib/solarwinds_apm/support/swomarginalia/comment.rb
115
- - lib/solarwinds_apm/support/swomarginalia/formatter.rb
116
- - lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb
117
- - lib/solarwinds_apm/support/swomarginalia/railtie.rb
118
- - lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb
119
- - lib/solarwinds_apm/support/transaction_cache.rb
120
176
  - lib/solarwinds_apm/support/transaction_settings.rb
121
177
  - lib/solarwinds_apm/support/txn_name_manager.rb
122
178
  - lib/solarwinds_apm/support/utils.rb
123
- - lib/solarwinds_apm/support/x_trace_options.rb
124
179
  - lib/solarwinds_apm/version.rb
125
180
  homepage: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
126
181
  licenses:
@@ -131,7 +186,7 @@ metadata:
131
186
  homepage_uri: https://documentation.solarwinds.com/en/success_center/observability/content/intro/landing-page.html
132
187
  source_code_uri: https://github.com/solarwinds/apm-ruby
133
188
  rubygems_mfa_required: 'true'
134
- post_install_message:
189
+ post_install_message:
135
190
  rdoc_options: []
136
191
  require_paths:
137
192
  - lib
@@ -139,15 +194,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
194
  requirements:
140
195
  - - ">="
141
196
  - !ruby/object:Gem::Version
142
- version: 2.7.0
197
+ version: 3.0.0
143
198
  required_rubygems_version: !ruby/object:Gem::Requirement
144
199
  requirements:
145
- - - ">="
200
+ - - ">"
146
201
  - !ruby/object:Gem::Version
147
- version: '0'
202
+ version: 1.3.1
148
203
  requirements: []
149
204
  rubygems_version: 3.3.27
150
- signing_key:
205
+ signing_key:
151
206
  specification_version: 4
152
207
  summary: SolarWindsAPM performance instrumentation gem for Ruby
153
208
  test_files: []
@@ -1,168 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2016 SolarWinds, LLC.
4
- # All rights reserved.
5
-
6
- require 'mkmf'
7
- require 'rbconfig'
8
- require 'open-uri'
9
-
10
- CONFIG['warnflags'] = CONFIG['warnflags'].gsub('-Wdeclaration-after-statement', '')
11
- .gsub('-Wimplicit-function-declaration', '')
12
- .gsub('-Wimplicit-int', '')
13
- .gsub('-Wno-tautological-compare', '')
14
- .gsub('-Wno-self-assign', '')
15
- .gsub('-Wno-parentheses-equality', '')
16
- .gsub('-Wno-constant-logical-operand', '')
17
- .gsub('-Wno-cast-function-type', '')
18
- init_mkmf(CONFIG)
19
-
20
- ext_dir = __dir__
21
- oboe_env = ENV.fetch('OBOE_ENV', nil)
22
- non_production = %w[dev stg].include? oboe_env.to_s
23
-
24
- swo_lib_dir = File.join(ext_dir, 'lib')
25
- version = File.read(File.join(ext_dir, 'src', 'VERSION')).strip
26
-
27
- case oboe_env
28
- when 'dev'
29
- swo_path = 'https://solarwinds-apm-staging.s3.us-west-2.amazonaws.com/apm/c-lib/nightly'
30
- puts 'Fetching c-lib from DEVELOPMENT Build'
31
- when 'stg'
32
- swo_path = File.join('https://agent-binaries.global.st-ssp.solarwinds.com/apm/c-lib/', version)
33
- puts 'Fetching c-lib from STAGING Build'
34
- else
35
- swo_path = File.join('https://agent-binaries.cloud.solarwinds.com/apm/c-lib/', version)
36
- puts 'Fetching c-lib from PRODUCTION Build'
37
- end
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
-
48
- swo_arch = 'x86_64'
49
- system_arch = `uname -m` # for mac, the command is `uname` # "Darwin\n"; try `uname -a`
50
- system_arch.delete!("\n")
51
- case system_arch
52
- when 'x86_64'
53
- swo_arch = 'x86_64'
54
- when 'aarch64' || 'arm64'
55
- swo_arch = 'aarch64'
56
- end
57
-
58
- if File.exist?('/etc/alpine-release')
59
- version = File.read('/etc/alpine-release').strip
60
-
61
- tmp_swo_arch = swo_arch.clone
62
- swo_arch =
63
- if Gem::Version.new(version) < Gem::Version.new('3.9')
64
- "alpine-libressl-#{tmp_swo_arch}"
65
- else # openssl
66
- "alpine-#{tmp_swo_arch}"
67
- end
68
- end
69
-
70
- swo_clib = "liboboe-1.0-#{swo_arch}.so"
71
- swo_clib = "liboboe-1.0-lambda-#{swo_arch}.so" if ENV['LAMBDA_TASK_ROOT'] || ENV['AWS_LAMBDA_FUNCTION_NAME']
72
- swo_item = File.join(swo_path, swo_clib)
73
- swo_checksum_file = File.join(swo_lib_dir, "#{swo_clib}.sha256")
74
- clib = File.join(swo_lib_dir, swo_clib)
75
-
76
- retries = 3
77
- success = false
78
- while retries.positive?
79
- begin
80
- IO.copy_stream(URI.parse(swo_item).open, clib)
81
- clib_checksum = Digest::SHA256.file(clib).hexdigest
82
- checksum = File.read(swo_checksum_file).strip
83
-
84
- # sha256 always from prod, so no matching for stg or nightly build or debug mode
85
- # so ignore the sha comparsion when fetching from development and staging build
86
- checksum = clib_checksum if non_production || oboe_debug
87
-
88
- # unfortunately these messages only show if the install command is run
89
- # with the `--verbose` flag
90
- if clib_checksum == checksum
91
- success = true
92
- else
93
- puts 'Checksum Verification Fail' # this is mainly for testing
94
- warn '== ERROR ================================================================='
95
- warn 'Checksum Verification failed for the c-extension of the solarwinds_apm gem'
96
- warn 'Installation cannot continue'
97
- warn "\nChecksum packaged with gem: #{checksum}"
98
- warn "Checksum calculated from lib: #{clib_checksum}"
99
- warn 'Contact technicalsupport@solarwinds.com if the problem persists'
100
- warn '=========================================================================='
101
- end
102
- retries = 0
103
- rescue StandardError => e
104
- File.write(clib, '')
105
- retries -= 1
106
- if retries.zero?
107
- warn '== ERROR =========================================================='
108
- warn 'Download of the c-extension for the solarwinds_apm gem failed.'
109
- warn 'solarwinds_apm will not instrument the code. No tracing will occur.'
110
- warn 'Contact technicalsupport@solarwinds.com if the problem persists.'
111
- warn "error: #{swo_item}\n#{e.message}"
112
- warn '==================================================================='
113
- create_makefile('oboe_noop', 'noop')
114
- end
115
- sleep 0.5
116
- end
117
- end
118
-
119
- if success
120
- # Create relative symlinks for the SolarWindsAPM library
121
- Dir.chdir(swo_lib_dir) do
122
- File.symlink(swo_clib, 'liboboe.so')
123
- File.symlink(swo_clib, 'liboboe-1.0.so.0')
124
- end
125
-
126
- dir_config('oboe', 'src', 'lib')
127
-
128
- # create Makefile
129
- if have_library('oboe')
130
- $libs = append_library($libs, 'oboe')
131
- $libs = append_library($libs, 'stdc++')
132
-
133
- $CFLAGS << " #{ENV.fetch('CFLAGS', nil)}"
134
-
135
- # -pg option is used for generating profiling information with gprof
136
- $CPPFLAGS << if oboe_debug
137
- " #{ENV.fetch('CPPFLAGS', nil)} -std=c++11 -gdwarf-2 -I$$ORIGIN/../ext/oboe_metal/src"
138
- else
139
- " #{ENV.fetch('CPPFLAGS', nil)} -std=c++11 -I$$ORIGIN/../ext/oboe_metal/src"
140
- end
141
-
142
- $LIBS << " #{ENV.fetch('LIBS', nil)}"
143
-
144
- # -lrt option is used when linking programs with the GNU Compiler Collection (GCC) to
145
- # include the POSIX real-time extensions library, librt.
146
- $LDFLAGS << " #{ENV.fetch('LDFLAGS', nil)} '-Wl,-rpath=$$ORIGIN/../ext/oboe_metal/lib' -lrt"
147
- $CXXFLAGS += ' -std=c++11 '
148
-
149
- # OBOE_DEBUG need to be enabled before downloading and installing the gem
150
- if oboe_debug
151
- CONFIG['debugflags'] = '-ggdb3 '
152
- CONFIG['optflags'] = '-O0'
153
- end
154
-
155
- create_makefile('libsolarwinds_apm', 'src')
156
- else
157
- warn '== ERROR ========================================================='
158
- if have_library('oboe')
159
- warn "The c-library either needs to be updated or doesn't match the OS."
160
- warn 'No tracing will occur.'
161
- else
162
- warn 'Could not find a matching c-library. No tracing will occur.'
163
- end
164
- warn 'Contact technicalsupport@solarwinds.com if the problem persists.'
165
- warn '=================================================================='
166
- create_makefile('oboe_noop', 'noop')
167
- end
168
- end
@@ -1 +0,0 @@
1
- 53295ec020a713c5f6fe7c14b150a10ac7db0e5ea692fbd6945ee69f7a581271
@@ -1 +0,0 @@
1
- 37407ece6aafcb662fbce8eb23f98a9b017154c66c8ec02eda835702ba14f446
@@ -1 +0,0 @@
1
- 925d65c2a940a82315525ea2e82eb357793f7db8a2a8ec529e7c03e2478bc965
@@ -1 +0,0 @@
1
- 3d49133827a0b6839744231e3ca49f8c9340380063286b8c3794bde585370001
@@ -1 +0,0 @@
1
- e2198827ce86309a59def33be14f17d0474477df33a5d75bd415d73a01c790b3
@@ -1 +0,0 @@
1
- 798a7c9551c66af743e1d6d2b736bf5667fa97fdc0ac8eec825fe4f63adaa044
@@ -1 +0,0 @@
1
- 15.0.3