appoptics_apm 4.12.2 → 4.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build_and_release_gem.yml +103 -0
  3. data/.github/workflows/build_for_packagecloud.yml +70 -0
  4. data/.github/workflows/docker-images.yml +47 -0
  5. data/.github/workflows/run_cpluplus_tests.yml +73 -0
  6. data/.github/workflows/run_tests.yml +168 -0
  7. data/.github/workflows/scripts/test_install.rb +23 -0
  8. data/.github/workflows/swig/swig-v4.0.2.tar.gz +0 -0
  9. data/.github/workflows/test_on_4_linux.yml +159 -0
  10. data/.gitignore +17 -25
  11. data/.travis.yml +17 -14
  12. data/Gemfile +1 -25
  13. data/README.md +4 -6
  14. data/appoptics_apm.gemspec +11 -5
  15. data/examples/prepend.rb +13 -0
  16. data/examples/sdk_examples.rb +16 -0
  17. data/ext/oboe_metal/extconf.rb +25 -31
  18. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -0
  19. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -0
  20. data/ext/oboe_metal/src/README.md +6 -0
  21. data/ext/oboe_metal/src/VERSION +2 -1
  22. data/ext/oboe_metal/src/frames.cc +246 -0
  23. data/ext/oboe_metal/src/frames.h +40 -0
  24. data/ext/oboe_metal/src/init_appoptics_apm.cc +5 -4
  25. data/ext/oboe_metal/src/logging.cc +95 -0
  26. data/ext/oboe_metal/src/logging.h +35 -0
  27. data/ext/oboe_metal/src/oboe.h +8 -5
  28. data/ext/oboe_metal/src/oboe_api.cpp +40 -14
  29. data/ext/oboe_metal/src/oboe_api.hpp +29 -8
  30. data/ext/oboe_metal/src/oboe_debug.h +1 -0
  31. data/ext/oboe_metal/src/oboe_swig_wrap.cc +85 -21
  32. data/ext/oboe_metal/src/profiling.cc +435 -0
  33. data/ext/oboe_metal/src/profiling.h +78 -0
  34. data/ext/oboe_metal/test/CMakeLists.txt +53 -0
  35. data/ext/oboe_metal/test/FindGMock.cmake +43 -0
  36. data/ext/oboe_metal/test/README.md +56 -0
  37. data/ext/oboe_metal/test/frames_test.cc +164 -0
  38. data/ext/oboe_metal/test/profiling_test.cc +93 -0
  39. data/ext/oboe_metal/test/ruby_inc_dir.rb +8 -0
  40. data/ext/oboe_metal/test/ruby_prefix.rb +8 -0
  41. data/ext/oboe_metal/test/ruby_test_helper.rb +67 -0
  42. data/ext/oboe_metal/test/test.h +11 -0
  43. data/ext/oboe_metal/test/test_main.cc +32 -0
  44. data/lib/appoptics_apm/api/metrics.rb +3 -0
  45. data/lib/appoptics_apm/base.rb +1 -1
  46. data/lib/appoptics_apm/config.rb +11 -2
  47. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x.rb +7 -1
  48. data/lib/appoptics_apm/inst/rack.rb +13 -6
  49. data/lib/appoptics_apm/inst/redis.rb +1 -2
  50. data/lib/appoptics_apm/noop/context.rb +3 -0
  51. data/lib/appoptics_apm/noop/metadata.rb +4 -1
  52. data/lib/appoptics_apm/noop/profiling.rb +21 -0
  53. data/lib/appoptics_apm/oboe_init_options.rb +26 -22
  54. data/lib/appoptics_apm/support/profiling.rb +18 -0
  55. data/lib/appoptics_apm/support/transaction_metrics.rb +1 -1
  56. data/lib/appoptics_apm/support/transaction_settings.rb +2 -2
  57. data/lib/appoptics_apm/support/x_trace_options.rb +2 -2
  58. data/lib/appoptics_apm/support_report.rb +2 -2
  59. data/lib/appoptics_apm/test.rb +4 -3
  60. data/lib/appoptics_apm/util.rb +1 -1
  61. data/lib/appoptics_apm/version.rb +3 -3
  62. data/lib/appoptics_apm/xtrace.rb +1 -1
  63. data/lib/appoptics_apm.rb +3 -1
  64. data/lib/oboe_metal.rb +2 -2
  65. data/lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb +24 -0
  66. data/log/.keep +0 -0
  67. metadata +46 -16
  68. data/.travis/bundle.sh +0 -9
data/lib/oboe_metal.rb CHANGED
@@ -85,7 +85,7 @@ module AppOpticsAPM
85
85
  # gem isn't in the bundle, it should rightfully error out
86
86
  # anyways.
87
87
  #
88
- if Gem.loaded_specs['bson'].version.to_s < '4.0'
88
+ if Gem.loaded_specs['bson'] && Gem.loaded_specs['bson'].version.to_s < '4.0'
89
89
  s = StringIO.new(contents[0])
90
90
 
91
91
  until s.eof?
@@ -96,7 +96,7 @@ module AppOpticsAPM
96
96
  end
97
97
  end
98
98
  else
99
- bbb = BSON::ByteBuffer.new(contents[0])
99
+ bbb = ::BSON::ByteBuffer.new(contents[0])
100
100
  until bbb.length == 0
101
101
  traces << Hash.from_bson(bbb)
102
102
  end
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Copyright (c) 2019 SolarWinds, LLC.
4
+ # All rights reserved.
5
+
3
6
  # AppOpticsAPM Initializer (for the appoptics_apm gem)
4
7
  # https://www.appoptics.com/
5
8
  #
@@ -76,6 +79,27 @@ if defined?(AppOpticsAPM::Config)
76
79
  #
77
80
  AppOpticsAPM::Config[:verbose] = false
78
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
+
79
103
  #
80
104
  # Turn Tracing on or off
81
105
  #
data/log/.keep ADDED
File without changes
metadata CHANGED
@@ -1,56 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appoptics_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.2
4
+ version: 4.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maia Engeli
8
8
  - Peter Giacomo Lombardo
9
9
  - Spiros Eliopoulos
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-03-03 00:00:00.000000000 Z
13
+ date: 2021-09-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ">="
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '0'
28
+ version: '2.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: no_proxy_fix
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
35
  version: 0.1.2
36
- - - "~>"
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: 0.1.2
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ">="
43
+ - - "~>"
44
44
  - !ruby/object:Gem::Version
45
45
  version: 0.1.2
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: 0.1.2
49
49
  description: 'Automatic tracing and metrics for Ruby applications. Get started at
50
50
  appoptics.com. @AppOptics
51
51
 
52
52
  '
53
- email: support@appoptics.com
53
+ email: technicalsupport@solarwinds.com
54
54
  executables:
55
55
  - appoptics_apm_config
56
56
  extensions:
@@ -60,10 +60,17 @@ extra_rdoc_files:
60
60
  files:
61
61
  - ".dockerignore"
62
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"
63
71
  - ".gitignore"
64
72
  - ".rubocop.yml"
65
73
  - ".travis.yml"
66
- - ".travis/bundle.sh"
67
74
  - ".yardopts"
68
75
  - CHANGELOG.md
69
76
  - CONFIG.md
@@ -72,20 +79,40 @@ files:
72
79
  - README.md
73
80
  - appoptics_apm.gemspec
74
81
  - bin/appoptics_apm_config
82
+ - examples/prepend.rb
75
83
  - examples/sdk_examples.rb
76
84
  - ext/oboe_metal/README.md
77
85
  - ext/oboe_metal/extconf.rb
78
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
79
89
  - ext/oboe_metal/noop/noop.c
90
+ - ext/oboe_metal/src/README.md
80
91
  - ext/oboe_metal/src/VERSION
81
92
  - ext/oboe_metal/src/bson/bson.h
82
93
  - ext/oboe_metal/src/bson/platform_hacks.h
94
+ - ext/oboe_metal/src/frames.cc
95
+ - ext/oboe_metal/src/frames.h
83
96
  - ext/oboe_metal/src/init_appoptics_apm.cc
97
+ - ext/oboe_metal/src/logging.cc
98
+ - ext/oboe_metal/src/logging.h
84
99
  - ext/oboe_metal/src/oboe.h
85
100
  - ext/oboe_metal/src/oboe_api.cpp
86
101
  - ext/oboe_metal/src/oboe_api.hpp
87
102
  - ext/oboe_metal/src/oboe_debug.h
88
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
89
116
  - init.rb
90
117
  - lib/appoptics_apm.rb
91
118
  - lib/appoptics_apm/api.rb
@@ -150,12 +177,14 @@ files:
150
177
  - lib/appoptics_apm/noop/README.md
151
178
  - lib/appoptics_apm/noop/context.rb
152
179
  - lib/appoptics_apm/noop/metadata.rb
180
+ - lib/appoptics_apm/noop/profiling.rb
153
181
  - lib/appoptics_apm/oboe_init_options.rb
154
182
  - lib/appoptics_apm/ruby.rb
155
183
  - lib/appoptics_apm/sdk/current_trace.rb
156
184
  - lib/appoptics_apm/sdk/custom_metrics.rb
157
185
  - lib/appoptics_apm/sdk/logging.rb
158
186
  - lib/appoptics_apm/sdk/tracing.rb
187
+ - lib/appoptics_apm/support/profiling.rb
159
188
  - lib/appoptics_apm/support/transaction_metrics.rb
160
189
  - lib/appoptics_apm/support/transaction_settings.rb
161
190
  - lib/appoptics_apm/support/x_trace_options.rb
@@ -170,6 +199,7 @@ files:
170
199
  - lib/oboe_metal.rb
171
200
  - lib/rails/generators/appoptics_apm/install_generator.rb
172
201
  - lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb
202
+ - log/.keep
173
203
  - yardoc_frontpage.md
174
204
  homepage: https://www.appoptics.com/
175
205
  licenses:
@@ -179,7 +209,7 @@ metadata:
179
209
  documentation_uri: https://docs.appoptics.com/kb/apm_tracing/ruby/
180
210
  homepage_uri: https://www.appoptics.com/
181
211
  source_code_uri: https://github.com/appoptics/appoptics-apm-ruby
182
- post_install_message:
212
+ post_install_message:
183
213
  rdoc_options: []
184
214
  require_paths:
185
215
  - lib
@@ -194,8 +224,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
224
  - !ruby/object:Gem::Version
195
225
  version: '0'
196
226
  requirements: []
197
- rubygems_version: 3.0.3
198
- signing_key:
227
+ rubygems_version: 3.1.6
228
+ signing_key:
199
229
  specification_version: 4
200
230
  summary: AppOptics APM performance instrumentation gem for Ruby
201
231
  test_files: []
data/.travis/bundle.sh DELETED
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
-
3
- if [[ $BUNDLE_GEMFILE == *"gemfiles/frameworks.gemfile"* ]]
4
- then
5
- gem install bundler -v 1.17.3
6
- bundle _1.17.3_ update --jobs=3 --retry=3
7
- else
8
- bundle update --jobs=3 --retry=3
9
- fi