appoptics_apm-zearn 4.13.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.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +5 -0
  3. data/.github/ISSUE_TEMPLATE/bug-or-feature-request.md +16 -0
  4. data/.github/workflows/build_and_release_gem.yml +103 -0
  5. data/.github/workflows/build_for_packagecloud.yml +70 -0
  6. data/.github/workflows/docker-images.yml +47 -0
  7. data/.github/workflows/run_cpluplus_tests.yml +73 -0
  8. data/.github/workflows/run_tests.yml +168 -0
  9. data/.github/workflows/scripts/test_install.rb +23 -0
  10. data/.github/workflows/swig/swig-v4.0.2.tar.gz +0 -0
  11. data/.github/workflows/test_on_4_linux.yml +159 -0
  12. data/.gitignore +36 -0
  13. data/.rubocop.yml +29 -0
  14. data/.travis.yml +130 -0
  15. data/.yardopts +6 -0
  16. data/CHANGELOG.md +769 -0
  17. data/CONFIG.md +33 -0
  18. data/Gemfile +14 -0
  19. data/LICENSE +202 -0
  20. data/README.md +393 -0
  21. data/appoptics_apm.gemspec +70 -0
  22. data/bin/appoptics_apm_config +15 -0
  23. data/examples/prepend.rb +13 -0
  24. data/examples/sdk_examples.rb +158 -0
  25. data/ext/oboe_metal/README.md +69 -0
  26. data/ext/oboe_metal/extconf.rb +151 -0
  27. data/ext/oboe_metal/lib/.keep +0 -0
  28. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -0
  29. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -0
  30. data/ext/oboe_metal/noop/noop.c +8 -0
  31. data/ext/oboe_metal/src/README.md +6 -0
  32. data/ext/oboe_metal/src/VERSION +2 -0
  33. data/ext/oboe_metal/src/bson/bson.h +220 -0
  34. data/ext/oboe_metal/src/bson/platform_hacks.h +91 -0
  35. data/ext/oboe_metal/src/frames.cc +246 -0
  36. data/ext/oboe_metal/src/frames.h +40 -0
  37. data/ext/oboe_metal/src/init_appoptics_apm.cc +21 -0
  38. data/ext/oboe_metal/src/logging.cc +95 -0
  39. data/ext/oboe_metal/src/logging.h +35 -0
  40. data/ext/oboe_metal/src/oboe.h +1156 -0
  41. data/ext/oboe_metal/src/oboe_api.cpp +652 -0
  42. data/ext/oboe_metal/src/oboe_api.hpp +431 -0
  43. data/ext/oboe_metal/src/oboe_debug.h +59 -0
  44. data/ext/oboe_metal/src/oboe_swig_wrap.cc +7329 -0
  45. data/ext/oboe_metal/src/profiling.cc +435 -0
  46. data/ext/oboe_metal/src/profiling.h +78 -0
  47. data/ext/oboe_metal/test/CMakeLists.txt +53 -0
  48. data/ext/oboe_metal/test/FindGMock.cmake +43 -0
  49. data/ext/oboe_metal/test/README.md +56 -0
  50. data/ext/oboe_metal/test/frames_test.cc +164 -0
  51. data/ext/oboe_metal/test/profiling_test.cc +93 -0
  52. data/ext/oboe_metal/test/ruby_inc_dir.rb +8 -0
  53. data/ext/oboe_metal/test/ruby_prefix.rb +8 -0
  54. data/ext/oboe_metal/test/ruby_test_helper.rb +67 -0
  55. data/ext/oboe_metal/test/test.h +11 -0
  56. data/ext/oboe_metal/test/test_main.cc +32 -0
  57. data/init.rb +4 -0
  58. data/lib/appoptics_apm/api/layerinit.rb +41 -0
  59. data/lib/appoptics_apm/api/logging.rb +381 -0
  60. data/lib/appoptics_apm/api/memcache.rb +37 -0
  61. data/lib/appoptics_apm/api/metrics.rb +63 -0
  62. data/lib/appoptics_apm/api/tracing.rb +57 -0
  63. data/lib/appoptics_apm/api/util.rb +120 -0
  64. data/lib/appoptics_apm/api.rb +21 -0
  65. data/lib/appoptics_apm/base.rb +231 -0
  66. data/lib/appoptics_apm/config.rb +299 -0
  67. data/lib/appoptics_apm/frameworks/grape.rb +98 -0
  68. data/lib/appoptics_apm/frameworks/padrino.rb +78 -0
  69. data/lib/appoptics_apm/frameworks/rails/inst/action_controller.rb +104 -0
  70. data/lib/appoptics_apm/frameworks/rails/inst/action_controller4.rb +48 -0
  71. data/lib/appoptics_apm/frameworks/rails/inst/action_controller5.rb +50 -0
  72. data/lib/appoptics_apm/frameworks/rails/inst/action_controller6.rb +50 -0
  73. data/lib/appoptics_apm/frameworks/rails/inst/action_controller_api.rb +50 -0
  74. data/lib/appoptics_apm/frameworks/rails/inst/action_view.rb +88 -0
  75. data/lib/appoptics_apm/frameworks/rails/inst/active_record.rb +27 -0
  76. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql.rb +43 -0
  77. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql2.rb +29 -0
  78. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/postgresql.rb +31 -0
  79. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils.rb +119 -0
  80. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x.rb +114 -0
  81. data/lib/appoptics_apm/frameworks/rails/inst/logger_formatters.rb +27 -0
  82. data/lib/appoptics_apm/frameworks/rails.rb +100 -0
  83. data/lib/appoptics_apm/frameworks/sinatra.rb +96 -0
  84. data/lib/appoptics_apm/inst/bunny-client.rb +148 -0
  85. data/lib/appoptics_apm/inst/bunny-consumer.rb +89 -0
  86. data/lib/appoptics_apm/inst/curb.rb +332 -0
  87. data/lib/appoptics_apm/inst/dalli.rb +85 -0
  88. data/lib/appoptics_apm/inst/delayed_job.rb +92 -0
  89. data/lib/appoptics_apm/inst/em-http-request.rb +101 -0
  90. data/lib/appoptics_apm/inst/excon.rb +125 -0
  91. data/lib/appoptics_apm/inst/faraday.rb +106 -0
  92. data/lib/appoptics_apm/inst/graphql.rb +240 -0
  93. data/lib/appoptics_apm/inst/grpc_client.rb +159 -0
  94. data/lib/appoptics_apm/inst/grpc_server.rb +120 -0
  95. data/lib/appoptics_apm/inst/http.rb +81 -0
  96. data/lib/appoptics_apm/inst/httpclient.rb +174 -0
  97. data/lib/appoptics_apm/inst/logger_formatter.rb +50 -0
  98. data/lib/appoptics_apm/inst/logging_log_event.rb +28 -0
  99. data/lib/appoptics_apm/inst/lumberjack_formatter.rb +13 -0
  100. data/lib/appoptics_apm/inst/memcached.rb +86 -0
  101. data/lib/appoptics_apm/inst/mongo.rb +246 -0
  102. data/lib/appoptics_apm/inst/mongo2.rb +225 -0
  103. data/lib/appoptics_apm/inst/moped.rb +466 -0
  104. data/lib/appoptics_apm/inst/rack.rb +182 -0
  105. data/lib/appoptics_apm/inst/rack_cache.rb +35 -0
  106. data/lib/appoptics_apm/inst/redis.rb +274 -0
  107. data/lib/appoptics_apm/inst/resque.rb +151 -0
  108. data/lib/appoptics_apm/inst/rest-client.rb +48 -0
  109. data/lib/appoptics_apm/inst/sequel.rb +178 -0
  110. data/lib/appoptics_apm/inst/sidekiq-client.rb +55 -0
  111. data/lib/appoptics_apm/inst/sidekiq-worker.rb +66 -0
  112. data/lib/appoptics_apm/inst/twitter-cassandra.rb +294 -0
  113. data/lib/appoptics_apm/inst/typhoeus.rb +108 -0
  114. data/lib/appoptics_apm/instrumentation.rb +22 -0
  115. data/lib/appoptics_apm/loading.rb +65 -0
  116. data/lib/appoptics_apm/logger.rb +14 -0
  117. data/lib/appoptics_apm/noop/README.md +9 -0
  118. data/lib/appoptics_apm/noop/context.rb +27 -0
  119. data/lib/appoptics_apm/noop/metadata.rb +25 -0
  120. data/lib/appoptics_apm/noop/profiling.rb +21 -0
  121. data/lib/appoptics_apm/oboe_init_options.rb +211 -0
  122. data/lib/appoptics_apm/ruby.rb +35 -0
  123. data/lib/appoptics_apm/sdk/current_trace.rb +77 -0
  124. data/lib/appoptics_apm/sdk/custom_metrics.rb +94 -0
  125. data/lib/appoptics_apm/sdk/logging.rb +37 -0
  126. data/lib/appoptics_apm/sdk/tracing.rb +434 -0
  127. data/lib/appoptics_apm/support/profiling.rb +18 -0
  128. data/lib/appoptics_apm/support/transaction_metrics.rb +67 -0
  129. data/lib/appoptics_apm/support/transaction_settings.rb +219 -0
  130. data/lib/appoptics_apm/support/x_trace_options.rb +110 -0
  131. data/lib/appoptics_apm/support_report.rb +119 -0
  132. data/lib/appoptics_apm/test.rb +95 -0
  133. data/lib/appoptics_apm/thread_local.rb +26 -0
  134. data/lib/appoptics_apm/util.rb +326 -0
  135. data/lib/appoptics_apm/version.rb +16 -0
  136. data/lib/appoptics_apm/xtrace.rb +115 -0
  137. data/lib/appoptics_apm.rb +77 -0
  138. data/lib/joboe_metal.rb +212 -0
  139. data/lib/oboe.rb +7 -0
  140. data/lib/oboe_metal.rb +172 -0
  141. data/lib/rails/generators/appoptics_apm/install_generator.rb +47 -0
  142. data/lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb +425 -0
  143. data/log/.keep +0 -0
  144. data/yardoc_frontpage.md +26 -0
  145. metadata +231 -0
@@ -0,0 +1,425 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2019 SolarWinds, LLC.
4
+ # All rights reserved.
5
+
6
+ # AppOpticsAPM Initializer (for the appoptics_apm gem)
7
+ # https://www.appoptics.com/
8
+ #
9
+ # More information on instrumenting Ruby applications can be found here:
10
+ # https://docs.appoptics.com/kb/apm_tracing/ruby/
11
+ #
12
+ # The settings in this template file represent the defaults
13
+
14
+ if defined?(AppOpticsAPM::Config)
15
+
16
+ # :service_key, :hostname_alias, :http_proxy, and :debug_level
17
+ # are startup settings and can't be changed afterwards.
18
+
19
+ #
20
+ # Set APPOPTICS_SERVICE_KEY
21
+ # This setting will be overridden if APPOPTICS_SERVICE_KEY is set as an environment variable.
22
+ # This is a required setting. If the service key is not set here it needs to be set as environment variable.
23
+ #
24
+ # The service key is a combination of the API token plus a service name.
25
+ # E.g.: 0123456789abcde0123456789abcde0123456789abcde0123456789abcde1234:my_service
26
+ #
27
+ # AppOpticsAPM::Config[:service_key] = '0123456789abcde0123456789abcde0123456789abcde0123456789abcde1234:my_service'
28
+
29
+ #
30
+ # Set APPOPTICS_HOSTNAME_ALIAS
31
+ # This setting will be overridden if APPOPTICS_HOSTNAME_ALIAS is set as an environment variable
32
+ #
33
+ # AppOpticsAPM::Config[:hostname_alias] = 'alias_name'
34
+
35
+ #
36
+ # Set Proxy for AppOptics
37
+ # This setting will be overridden if APPOPTICS_PROXY is set as an environment variable.
38
+ #
39
+ # Please configure http_proxy if a proxy needs to be used to communicate with
40
+ # the AppOptics backend.
41
+ # The format should either be http://<proxyHost>:<proxyPort> for a proxy
42
+ # server that does not require authentication, or
43
+ # http://<username>:<password>@<proxyHost>:<proxyPort> for a proxy server that
44
+ # requires basic authentication.
45
+ #
46
+ # Note that while HTTP is the only type of connection supported, the traffic
47
+ # to AppOptics is still encrypted using SSL/TLS.
48
+ #
49
+ # It is recommended to configure the proxy in this file or as APPOPTICS_PROXY
50
+ # environment variable. However, the agent's underlying network library will
51
+ # use a system-wide proxy defined in the environment variables grpc_proxy,
52
+ # https_proxy or http_proxy if no AppOptics-specific configuration is set.
53
+ # Please refer to gRPC environment variables for more information.
54
+ #
55
+ # AppOpticsAPM::Config[:http_proxy] = http://<proxyHost>:<proxyPort>
56
+
57
+ #
58
+ # Set APPOPTICS_DEBUG_LEVEL
59
+ # This setting will be overridden if APPOPTICS_DEBUG_LEVEL is set as an environment variable.
60
+ #
61
+ # It sets the log level and takes the following values:
62
+ # -1 disabled, 0 fatal, 1 error, 2 warning, 3 info (the default), 4 debug low, 5 debug medium, 6 debug high.
63
+ # Values out of range (< -1 or > 6) are ignored and the log level is set to the default (info).
64
+ #
65
+ AppOpticsAPM::Config[:debug_level] = 3
66
+
67
+ #
68
+ # :debug_level will be used in the c-extension of the gem and also mapped to the
69
+ # Ruby logger as DISABLED, FATAL, ERROR, WARN, INFO, or DEBUG
70
+ # The Ruby logger can afterwards be changed to a different level, e.g:
71
+ # AppOpticsAPM.logger.level = Logger::INFO
72
+
73
+ #
74
+ # Set APPOPTICS_GEM_VERBOSE
75
+ # This setting will be overridden if APPOPTICS_GEM_VERBOSE is set as an environment variable
76
+ #
77
+ # On startup the components that are being instrumented will be reported if this is set to true.
78
+ # If true and the log level is 4 or higher this may create extra debug log messages
79
+ #
80
+ AppOpticsAPM::Config[:verbose] = false
81
+
82
+ #
83
+ # Turn code profiling on or off
84
+ #
85
+ # By default profiling is set to :disabled, the other option is :enabled.
86
+ # :enabled means that any traced code will also be profiled to get deeper insight
87
+ # into the methods called during a trace.
88
+ # Profiling in the appoptics_apm gem is based on the low-overhead, sampling
89
+ # profiler implemented in stackprof.
90
+ #
91
+ AppOpticsAPM::Config[:profiling] = :disabled
92
+
93
+ #
94
+ # Set the profiling interval (in milliseconds)
95
+ #
96
+ # The default is 10 milliseconds, which means that the method call stack is
97
+ # recorded every 10 milliseconds. Shorter intervals may give better insight,
98
+ # but will incur more overhead.
99
+ # Minimum: 1, Maximum: 100
100
+ #
101
+ AppOpticsAPM::Config[:profiling_interval] = 10
102
+
103
+ #
104
+ # Turn Tracing on or off
105
+ #
106
+ # By default tracing is set to :enabled, the other option is :disabled.
107
+ # :enabled means that sampling will be done according to the current
108
+ # sampling rate and metrics are reported.
109
+ # :disabled means that there is no sampling and metrics are not reported.
110
+ #
111
+ # The values :always and :never are deprecated
112
+ #
113
+ AppOpticsAPM::Config[:tracing_mode] = :enabled
114
+
115
+ #
116
+ # Turn Trigger Tracing on or off
117
+ #
118
+ # By default trigger tracing is :enabled, the other option is :disabled.
119
+ # It allows to use the X-Trace-Options header to force a request to be
120
+ # traced (within rate limits set for trigger tracing)
121
+ #
122
+ AppOpticsAPM::Config[:trigger_tracing_mode] = :enabled
123
+
124
+ #
125
+ # Trace Context in Logs
126
+ #
127
+ # Configure if and when the Trace ID should be included in application logs.
128
+ # Common Ruby and Rails loggers are auto-instrumented, so that they can include
129
+ # the current Trace ID in log messages.
130
+ #
131
+ # The added string will look like: "ao.traceId=7435A9FE510AE4533414D425DADF4E180D2B4E36-0"
132
+ # It ends in '-1' if the request is sampled and in '-0' otherwise.
133
+ #
134
+ # The following options are available:
135
+ # :never (default)
136
+ # :sampled only include the Trace ID of sampled requests
137
+ # :traced include the Trace ID for all traced requests
138
+ # :always always add a Trace ID, it will be '0000000000000000000000000000000000000000-0'
139
+ # when there is no tracing context.
140
+ #
141
+ AppOpticsAPM::Config[:log_traceId] = :never
142
+
143
+ #
144
+ # Prepend Domain to Transaction Name
145
+ #
146
+ # If this is set to `true` transaction names will be composed as
147
+ # `my.host.com/controller.action` instead of `controller.action`.
148
+ # This configuration applies to all transaction names, whether deduced by the
149
+ # instrumentation or implicitly set.
150
+ #
151
+ AppOpticsAPM::Config[:transaction_name][:prepend_domain] = false
152
+
153
+ #
154
+ # Sanitize SQL Statements
155
+ #
156
+ # The AppOpticsAPM Ruby client has the ability to sanitize query literals
157
+ # from SQL statements. By default this is enabled. Disable to
158
+ # collect and report query literals to AppOpticsAPM.
159
+ #
160
+ AppOpticsAPM::Config[:sanitize_sql] = true
161
+ AppOpticsAPM::Config[:sanitize_sql_regexp] = '(\'[^\']*\'|\d*\.\d+|\d+|NULL)'
162
+ AppOpticsAPM::Config[:sanitize_sql_opts] = Regexp::IGNORECASE
163
+
164
+ #
165
+ # Do Not Trace - DNT
166
+ #
167
+ # DEPRECATED
168
+ # Please comment out if no filtering is desired, e.g. your static
169
+ # assets are served by the web server and not the application
170
+ #
171
+ # This configuration allows creating a regexp for paths that should be excluded
172
+ # from appoptics processing.
173
+ #
174
+ # For example:
175
+ # - static assets that aren't served by the web server, or
176
+ # - healthcheck endpoints that respond to a heart beat.
177
+ #
178
+ # :dnt_regexp is the regular expression that is applied to the incoming path
179
+ # to determine whether the request should be measured and traced or not.
180
+ #
181
+ # :dnt_opts can be commented out, nil, or Regexp::IGNORECASE
182
+ #
183
+ # The matching happens before routes are applied.
184
+ # The path originates from the rack layer and is retrieved as follows:
185
+ # req = ::Rack::Request.new(env)
186
+ # path = URI.unescape(req.path)
187
+ #
188
+ AppOpticsAPM::Config[:dnt_regexp] = '\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|otf|eot|ttf|woff|woff2|svg|less)(\?.+){0,1}$'
189
+ AppOpticsAPM::Config[:dnt_opts] = Regexp::IGNORECASE
190
+
191
+ #
192
+ # GraphQL
193
+ #
194
+ # Enable tracing for GraphQL.
195
+ # (true | false, default: true)
196
+ AppOpticsAPM::Config[:graphql][:enabled] = true
197
+ # Replace query arguments with a '?' when sent with a trace.
198
+ # (true | false, default: true)
199
+ AppOpticsAPM::Config[:graphql][:sanitize] = true
200
+ # Remove comments from queries when sent with a trace.
201
+ # (true | false, default: true)
202
+ AppOpticsAPM::Config[:graphql][:remove_comments] = true
203
+ # Create a transaction name by combining
204
+ # "query" or "mutation" with the first word of the query.
205
+ # This overwrites the default transaction name, which is a combination of
206
+ # controller + action and would be the same for all graphql queries.
207
+ # (true | false, default: true)
208
+ AppOpticsAPM::Config[:graphql][:transaction_name] = true
209
+
210
+ #
211
+ # Rack::Cache
212
+ #
213
+ # Create a transaction name like `rack-cache.<cache-store>`,
214
+ # e.g. `rack-cache.memcached`
215
+ # This can reduce the number of transaction names, when many requests are
216
+ # served directly from the cache without hitting a controller action.
217
+ # When set to `false` the path will be used for the transaction name.
218
+ #
219
+ AppOpticsAPM::Config[:rack_cache] = { transaction_name: true }
220
+
221
+ #
222
+ # Transaction Settings
223
+ #
224
+ # Use this configuration to add exceptions to the global tracing mode and
225
+ # disable/enable metrics and traces for certain transactions.
226
+ #
227
+ # Currently allowed hash keys:
228
+ # :url to apply listed filters to urls.
229
+ # The matching of settings to urls happens before routes are applied.
230
+ # The url is extracted from the env argument passed to rack: `env['PATH_INFO']`
231
+ #
232
+ # and the hashes within the :url list either:
233
+ # :extensions takes an array of strings for filtering (not regular expressions!)
234
+ # :tracing defaults to :disabled, can be set to :enabled to override
235
+ # the global :disabled setting
236
+ # or:
237
+ # :regexp is a regular expression that is applied to the incoming path
238
+ # :opts (optional) nil(default) or Regexp::IGNORECASE (options for regexp)
239
+ # :tracing defaults to :disabled, can be set to :enabled to override
240
+ # the global :disabled setting
241
+ #
242
+ # Be careful not to add too many :regexp configurations as they will slow
243
+ # down execution.
244
+ #
245
+ AppOpticsAPM::Config[:transaction_settings] = {
246
+ url: [
247
+ # {
248
+ # extensions: %w['long_job'],
249
+ # tracing: :disabled
250
+ # },
251
+ # {
252
+ # regexp: '^.*\/long_job\/.*$',
253
+ # opts: Regexp::IGNORECASE,
254
+ # tracing: :disabled
255
+ # },
256
+ # {
257
+ # regexp: /batch/,
258
+ # }
259
+ ]
260
+ }
261
+
262
+ #
263
+ # Blacklist urls
264
+ #
265
+ # This configuration is used by outbound calls. If the call
266
+ # goes to a blacklisted url then we won't add any
267
+ # tracing information to the headers.
268
+ #
269
+ # The list has to an array of strings, even if only one url is blacklisted
270
+ #
271
+ # Example: AppOpticsAPM::Config[:blacklist] = ['google.com']
272
+ #
273
+ AppOpticsAPM::Config[:blacklist] = []
274
+
275
+ #
276
+ # Rails Exception Logging
277
+ #
278
+ # In Rails, raised exceptions with rescue handlers via
279
+ # <tt>rescue_from</tt> are not reported to the AppOptics
280
+ # dashboard by default. Setting this value to true will
281
+ # report all raised exceptions regardless.
282
+ #
283
+ AppOpticsAPM::Config[:report_rescued_errors] = false
284
+
285
+ #
286
+ # EC2 Metadata Fetching Timeout
287
+ #
288
+ # The timeout can be in the range 0 - 3000 (milliseconds)
289
+ # Setting to 0 milliseconds effectively disables fetching from
290
+ # the metadata URL (not waiting), and should only be used if
291
+ # not running on EC2 / Openstack to minimize agent start up time.
292
+ #
293
+ AppOpticsAPM::Config[:ec2_metadata_timeout] = 1000
294
+
295
+ #############################################
296
+ ## SETTINGS FOR INDIVIDUAL GEMS/FRAMEWORKS ##
297
+ #############################################
298
+
299
+ #
300
+ # Bunny Controller and Action
301
+ #
302
+ # The bunny (Rabbitmq) instrumentation can optionally report
303
+ # Controller and Action values to allow filtering of bunny
304
+ # message handling in # the UI. Use of Controller and Action
305
+ # for filters is temporary until the UI is updated with
306
+ # additional filters.
307
+ #
308
+ # These values identify which properties of
309
+ # Bunny::MessageProperties to report as Controller
310
+ # and Action. The defaults are to report :app_id (as
311
+ # Controller) and :type (as Action). If these values
312
+ # are not specified in the publish, then nothing
313
+ # will be reported here.
314
+ #
315
+ AppOpticsAPM::Config[:bunnyconsumer][:controller] = :app_id
316
+ AppOpticsAPM::Config[:bunnyconsumer][:action] = :type
317
+
318
+ #
319
+ # Enabling/Disabling Instrumentation
320
+ #
321
+ # If you're having trouble with one of the instrumentation libraries, they
322
+ # can be individually disabled here by setting the :enabled
323
+ # value to false.
324
+ #
325
+ # :enabled settings are read on startup and can't be changed afterwards
326
+ #
327
+ AppOpticsAPM::Config[:action_controller][:enabled] = true
328
+ AppOpticsAPM::Config[:action_controller_api][:enabled] = true
329
+ AppOpticsAPM::Config[:action_view][:enabled] = true
330
+ AppOpticsAPM::Config[:active_record][:enabled] = true
331
+ AppOpticsAPM::Config[:bunnyclient][:enabled] = true
332
+ AppOpticsAPM::Config[:bunnyconsumer][:enabled] = true
333
+ AppOpticsAPM::Config[:cassandra][:enabled] = true
334
+ AppOpticsAPM::Config[:curb][:enabled] = true
335
+ AppOpticsAPM::Config[:dalli][:enabled] = true
336
+ AppOpticsAPM::Config[:delayed_jobclient][:enabled] = true
337
+ AppOpticsAPM::Config[:delayed_jobworker][:enabled] = true
338
+ # AppOpticsAPM::Config[:em_http_request][:enabled] = false # not supported anymore
339
+ AppOpticsAPM::Config[:excon][:enabled] = true
340
+ AppOpticsAPM::Config[:faraday][:enabled] = true
341
+ AppOpticsAPM::Config[:grpc_client][:enabled] = true
342
+ AppOpticsAPM::Config[:grpc_server][:enabled] = true
343
+ AppOpticsAPM::Config[:grape][:enabled] = true
344
+ AppOpticsAPM::Config[:httpclient][:enabled] = true
345
+ AppOpticsAPM::Config[:memcached][:enabled] = true
346
+ AppOpticsAPM::Config[:mongo][:enabled] = true
347
+ AppOpticsAPM::Config[:moped][:enabled] = true
348
+ AppOpticsAPM::Config[:nethttp][:enabled] = true
349
+ AppOpticsAPM::Config[:padrino][:enabled] = true
350
+ AppOpticsAPM::Config[:rack][:enabled] = true
351
+ AppOpticsAPM::Config[:redis][:enabled] = true
352
+ AppOpticsAPM::Config[:resqueclient][:enabled] = true
353
+ AppOpticsAPM::Config[:resqueworker][:enabled] = true
354
+ AppOpticsAPM::Config[:rest_client][:enabled] = true
355
+ AppOpticsAPM::Config[:sequel][:enabled] = true
356
+ AppOpticsAPM::Config[:sidekiqclient][:enabled] = true
357
+ AppOpticsAPM::Config[:sidekiqworker][:enabled] = true
358
+ AppOpticsAPM::Config[:sinatra][:enabled] = true
359
+ AppOpticsAPM::Config[:typhoeus][:enabled] = true
360
+
361
+ #
362
+ # Argument logging
363
+ #
364
+ #
365
+ # For http requests:
366
+ # By default the query string parameters are included in the URLs reported.
367
+ # Set :log_args to false and instrumentation will stop collecting
368
+ # and reporting query arguments from URLs.
369
+ #
370
+ AppOpticsAPM::Config[:bunnyconsumer][:log_args] = true
371
+ AppOpticsAPM::Config[:curb][:log_args] = true
372
+ AppOpticsAPM::Config[:excon][:log_args] = true
373
+ AppOpticsAPM::Config[:httpclient][:log_args] = true
374
+ AppOpticsAPM::Config[:mongo][:log_args] = true
375
+ AppOpticsAPM::Config[:nethttp][:log_args] = true
376
+ AppOpticsAPM::Config[:rack][:log_args] = true
377
+ AppOpticsAPM::Config[:resqueclient][:log_args] = true
378
+ AppOpticsAPM::Config[:resqueworker][:log_args] = true
379
+ AppOpticsAPM::Config[:sidekiqclient][:log_args] = true
380
+ AppOpticsAPM::Config[:sidekiqworker][:log_args] = true
381
+ AppOpticsAPM::Config[:typhoeus][:log_args] = true
382
+
383
+ #
384
+ # Enabling/Disabling Backtrace Collection
385
+ #
386
+ # Instrumentation can optionally collect backtraces as they collect
387
+ # performance metrics. Note that this has a negative impact on
388
+ # performance but can be useful when trying to locate the source of
389
+ # a certain call or operation.
390
+ #
391
+ AppOpticsAPM::Config[:action_controller][:collect_backtraces] = true
392
+ AppOpticsAPM::Config[:action_controller_api][:collect_backtraces] = true
393
+ AppOpticsAPM::Config[:action_view][:collect_backtraces] = true
394
+ AppOpticsAPM::Config[:active_record][:collect_backtraces] = true
395
+ AppOpticsAPM::Config[:bunnyclient][:collect_backtraces] = false
396
+ AppOpticsAPM::Config[:bunnyconsumer][:collect_backtraces] = false
397
+ AppOpticsAPM::Config[:cassandra][:collect_backtraces] = true
398
+ AppOpticsAPM::Config[:curb][:collect_backtraces] = true
399
+ AppOpticsAPM::Config[:dalli][:collect_backtraces] = false
400
+ AppOpticsAPM::Config[:delayed_jobclient][:collect_backtraces] = false
401
+ AppOpticsAPM::Config[:delayed_jobworker][:collect_backtraces] = false
402
+ # AppOpticsAPM::Config[:em_http_request][:collect_backtraces] = true # not supported anymore
403
+ AppOpticsAPM::Config[:excon][:collect_backtraces] = true
404
+ AppOpticsAPM::Config[:faraday][:collect_backtraces] = false
405
+ AppOpticsAPM::Config[:grape][:collect_backtraces] = true
406
+ AppOpticsAPM::Config[:grpc_client][:collect_backtraces] = false
407
+ AppOpticsAPM::Config[:grpc_server][:collect_backtraces] = false
408
+ AppOpticsAPM::Config[:httpclient][:collect_backtraces] = true
409
+ AppOpticsAPM::Config[:memcached][:collect_backtraces] = false
410
+ AppOpticsAPM::Config[:mongo][:collect_backtraces] = true
411
+ AppOpticsAPM::Config[:moped][:collect_backtraces] = true
412
+ AppOpticsAPM::Config[:nethttp][:collect_backtraces] = true
413
+ AppOpticsAPM::Config[:padrino][:collect_backtraces] = true
414
+ AppOpticsAPM::Config[:rack][:collect_backtraces] = true
415
+ AppOpticsAPM::Config[:redis][:collect_backtraces] = false
416
+ AppOpticsAPM::Config[:resqueclient][:collect_backtraces] = true
417
+ AppOpticsAPM::Config[:resqueworker][:collect_backtraces] = true
418
+ AppOpticsAPM::Config[:rest_client][:collect_backtraces] = true
419
+ AppOpticsAPM::Config[:sequel][:collect_backtraces] = true
420
+ AppOpticsAPM::Config[:sidekiqclient][:collect_backtraces] = false
421
+ AppOpticsAPM::Config[:sidekiqworker][:collect_backtraces] = false
422
+ AppOpticsAPM::Config[:sinatra][:collect_backtraces] = true
423
+ AppOpticsAPM::Config[:typhoeus][:collect_backtraces] = false
424
+
425
+ end
data/log/.keep ADDED
File without changes
@@ -0,0 +1,26 @@
1
+ # Welcome to the AppOpticsAPM Ruby Gem
2
+
3
+
4
+ The appoptics_apm gem provides automatic tracing and metrics for Ruby applications.
5
+ It requires an AppOptics account: sign up for a free trial at https://www.appoptics.com.
6
+
7
+ ![ruby_trace](https://docs.appoptics.com/_images/ruby_trace.png)
8
+
9
+ ## Documentation
10
+ https://docs.appoptics.com/kb/apm_tracing/ruby
11
+
12
+ ## Getting started
13
+ The gem instruments the ruby language and ruby on rails frameworks. It is hosted on RubyGems, making installation as
14
+ simple as: `gem install appoptics_apm`.
15
+
16
+ Our ruby extension gets detailed insights out-of-the-box without any code modification.
17
+ For a list of instrumented gems and components see https://docs.appoptics.com/kb/apm_tracing/ruby/support-matrix
18
+
19
+ Detailled installation instructions for Ruby and different frameworks like Rails, Sinatra, Padrino, and Grape can be
20
+ found here https://docs.appoptics.com/kb/apm_tracing/ruby/install
21
+
22
+ ## Custom instrumentation
23
+ If you have code or a library that is not on the platform support list, use our SDK (as documented here) to customize.
24
+
25
+
26
+
metadata ADDED
@@ -0,0 +1,231 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: appoptics_apm-zearn
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.13.1
5
+ platform: ruby
6
+ authors:
7
+ - Maia Engeli
8
+ - Peter Giacomo Lombardo
9
+ - Spiros Eliopoulos
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2024-12-19 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: json
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '2.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: no_proxy_fix
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: 0.1.2
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 0.1.2
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - "~>"
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.2
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 0.1.2
49
+ description: 'Automatic tracing and metrics for Ruby applications. Get started at
50
+ appoptics.com. @AppOptics
51
+
52
+ '
53
+ email: technicalsupport@solarwinds.com
54
+ executables:
55
+ - appoptics_apm_config
56
+ extensions:
57
+ - ext/oboe_metal/extconf.rb
58
+ extra_rdoc_files:
59
+ - LICENSE
60
+ files:
61
+ - ".dockerignore"
62
+ - ".github/ISSUE_TEMPLATE/bug-or-feature-request.md"
63
+ - ".github/workflows/build_and_release_gem.yml"
64
+ - ".github/workflows/build_for_packagecloud.yml"
65
+ - ".github/workflows/docker-images.yml"
66
+ - ".github/workflows/run_cpluplus_tests.yml"
67
+ - ".github/workflows/run_tests.yml"
68
+ - ".github/workflows/scripts/test_install.rb"
69
+ - ".github/workflows/swig/swig-v4.0.2.tar.gz"
70
+ - ".github/workflows/test_on_4_linux.yml"
71
+ - ".gitignore"
72
+ - ".rubocop.yml"
73
+ - ".travis.yml"
74
+ - ".yardopts"
75
+ - CHANGELOG.md
76
+ - CONFIG.md
77
+ - Gemfile
78
+ - LICENSE
79
+ - README.md
80
+ - appoptics_apm.gemspec
81
+ - bin/appoptics_apm_config
82
+ - examples/prepend.rb
83
+ - examples/sdk_examples.rb
84
+ - ext/oboe_metal/README.md
85
+ - ext/oboe_metal/extconf.rb
86
+ - ext/oboe_metal/lib/.keep
87
+ - ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256
88
+ - ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256
89
+ - ext/oboe_metal/noop/noop.c
90
+ - ext/oboe_metal/src/README.md
91
+ - ext/oboe_metal/src/VERSION
92
+ - ext/oboe_metal/src/bson/bson.h
93
+ - ext/oboe_metal/src/bson/platform_hacks.h
94
+ - ext/oboe_metal/src/frames.cc
95
+ - ext/oboe_metal/src/frames.h
96
+ - ext/oboe_metal/src/init_appoptics_apm.cc
97
+ - ext/oboe_metal/src/logging.cc
98
+ - ext/oboe_metal/src/logging.h
99
+ - ext/oboe_metal/src/oboe.h
100
+ - ext/oboe_metal/src/oboe_api.cpp
101
+ - ext/oboe_metal/src/oboe_api.hpp
102
+ - ext/oboe_metal/src/oboe_debug.h
103
+ - ext/oboe_metal/src/oboe_swig_wrap.cc
104
+ - ext/oboe_metal/src/profiling.cc
105
+ - ext/oboe_metal/src/profiling.h
106
+ - ext/oboe_metal/test/CMakeLists.txt
107
+ - ext/oboe_metal/test/FindGMock.cmake
108
+ - ext/oboe_metal/test/README.md
109
+ - ext/oboe_metal/test/frames_test.cc
110
+ - ext/oboe_metal/test/profiling_test.cc
111
+ - ext/oboe_metal/test/ruby_inc_dir.rb
112
+ - ext/oboe_metal/test/ruby_prefix.rb
113
+ - ext/oboe_metal/test/ruby_test_helper.rb
114
+ - ext/oboe_metal/test/test.h
115
+ - ext/oboe_metal/test/test_main.cc
116
+ - init.rb
117
+ - lib/appoptics_apm.rb
118
+ - lib/appoptics_apm/api.rb
119
+ - lib/appoptics_apm/api/layerinit.rb
120
+ - lib/appoptics_apm/api/logging.rb
121
+ - lib/appoptics_apm/api/memcache.rb
122
+ - lib/appoptics_apm/api/metrics.rb
123
+ - lib/appoptics_apm/api/tracing.rb
124
+ - lib/appoptics_apm/api/util.rb
125
+ - lib/appoptics_apm/base.rb
126
+ - lib/appoptics_apm/config.rb
127
+ - lib/appoptics_apm/frameworks/grape.rb
128
+ - lib/appoptics_apm/frameworks/padrino.rb
129
+ - lib/appoptics_apm/frameworks/rails.rb
130
+ - lib/appoptics_apm/frameworks/rails/inst/action_controller.rb
131
+ - lib/appoptics_apm/frameworks/rails/inst/action_controller4.rb
132
+ - lib/appoptics_apm/frameworks/rails/inst/action_controller5.rb
133
+ - lib/appoptics_apm/frameworks/rails/inst/action_controller6.rb
134
+ - lib/appoptics_apm/frameworks/rails/inst/action_controller_api.rb
135
+ - lib/appoptics_apm/frameworks/rails/inst/action_view.rb
136
+ - lib/appoptics_apm/frameworks/rails/inst/active_record.rb
137
+ - lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql.rb
138
+ - lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql2.rb
139
+ - lib/appoptics_apm/frameworks/rails/inst/connection_adapters/postgresql.rb
140
+ - lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils.rb
141
+ - lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x.rb
142
+ - lib/appoptics_apm/frameworks/rails/inst/logger_formatters.rb
143
+ - lib/appoptics_apm/frameworks/sinatra.rb
144
+ - lib/appoptics_apm/inst/bunny-client.rb
145
+ - lib/appoptics_apm/inst/bunny-consumer.rb
146
+ - lib/appoptics_apm/inst/curb.rb
147
+ - lib/appoptics_apm/inst/dalli.rb
148
+ - lib/appoptics_apm/inst/delayed_job.rb
149
+ - lib/appoptics_apm/inst/em-http-request.rb
150
+ - lib/appoptics_apm/inst/excon.rb
151
+ - lib/appoptics_apm/inst/faraday.rb
152
+ - lib/appoptics_apm/inst/graphql.rb
153
+ - lib/appoptics_apm/inst/grpc_client.rb
154
+ - lib/appoptics_apm/inst/grpc_server.rb
155
+ - lib/appoptics_apm/inst/http.rb
156
+ - lib/appoptics_apm/inst/httpclient.rb
157
+ - lib/appoptics_apm/inst/logger_formatter.rb
158
+ - lib/appoptics_apm/inst/logging_log_event.rb
159
+ - lib/appoptics_apm/inst/lumberjack_formatter.rb
160
+ - lib/appoptics_apm/inst/memcached.rb
161
+ - lib/appoptics_apm/inst/mongo.rb
162
+ - lib/appoptics_apm/inst/mongo2.rb
163
+ - lib/appoptics_apm/inst/moped.rb
164
+ - lib/appoptics_apm/inst/rack.rb
165
+ - lib/appoptics_apm/inst/rack_cache.rb
166
+ - lib/appoptics_apm/inst/redis.rb
167
+ - lib/appoptics_apm/inst/resque.rb
168
+ - lib/appoptics_apm/inst/rest-client.rb
169
+ - lib/appoptics_apm/inst/sequel.rb
170
+ - lib/appoptics_apm/inst/sidekiq-client.rb
171
+ - lib/appoptics_apm/inst/sidekiq-worker.rb
172
+ - lib/appoptics_apm/inst/twitter-cassandra.rb
173
+ - lib/appoptics_apm/inst/typhoeus.rb
174
+ - lib/appoptics_apm/instrumentation.rb
175
+ - lib/appoptics_apm/loading.rb
176
+ - lib/appoptics_apm/logger.rb
177
+ - lib/appoptics_apm/noop/README.md
178
+ - lib/appoptics_apm/noop/context.rb
179
+ - lib/appoptics_apm/noop/metadata.rb
180
+ - lib/appoptics_apm/noop/profiling.rb
181
+ - lib/appoptics_apm/oboe_init_options.rb
182
+ - lib/appoptics_apm/ruby.rb
183
+ - lib/appoptics_apm/sdk/current_trace.rb
184
+ - lib/appoptics_apm/sdk/custom_metrics.rb
185
+ - lib/appoptics_apm/sdk/logging.rb
186
+ - lib/appoptics_apm/sdk/tracing.rb
187
+ - lib/appoptics_apm/support/profiling.rb
188
+ - lib/appoptics_apm/support/transaction_metrics.rb
189
+ - lib/appoptics_apm/support/transaction_settings.rb
190
+ - lib/appoptics_apm/support/x_trace_options.rb
191
+ - lib/appoptics_apm/support_report.rb
192
+ - lib/appoptics_apm/test.rb
193
+ - lib/appoptics_apm/thread_local.rb
194
+ - lib/appoptics_apm/util.rb
195
+ - lib/appoptics_apm/version.rb
196
+ - lib/appoptics_apm/xtrace.rb
197
+ - lib/joboe_metal.rb
198
+ - lib/oboe.rb
199
+ - lib/oboe_metal.rb
200
+ - lib/rails/generators/appoptics_apm/install_generator.rb
201
+ - lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb
202
+ - log/.keep
203
+ - yardoc_frontpage.md
204
+ homepage: https://www.appoptics.com/
205
+ licenses:
206
+ - Apache-2.0
207
+ metadata:
208
+ changelog_uri: https://github.com/appoptics/appoptics-apm-ruby/releases
209
+ documentation_uri: https://docs.appoptics.com/kb/apm_tracing/ruby/
210
+ homepage_uri: https://www.appoptics.com/
211
+ source_code_uri: https://github.com/appoptics/appoptics-apm-ruby
212
+ post_install_message:
213
+ rdoc_options: []
214
+ require_paths:
215
+ - lib
216
+ required_ruby_version: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: 2.4.0
221
+ required_rubygems_version: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ version: '0'
226
+ requirements: []
227
+ rubygems_version: 3.1.6
228
+ signing_key:
229
+ specification_version: 4
230
+ summary: AppOptics APM performance instrumentation gem for Ruby
231
+ test_files: []